iptables: Logging connections on port 25/TCP
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have KVM virtualization. I have over 60 interfaces:
vnet1-60 - virtual;
vmbr0 - bridge;
enp2s0f0 - PHYSOUT;
I need to know how many connection make each vnet interface.
I have a rule like:
iptables -A FORWARD -o vnet1 -m state -p tcp --dport 25 --state NEW -j
LOG --log-level 7 --log-prefix "25port: "
... but no result. Same no result:
-A OUTPUT -o vnet*;
-A OUTPUT -o vnet55,vnet56;
-A OUTPUT -o enp2s0f0;
I get logs only when I use this:
-A FORWARD -o vmbr0 -s 123.0.0.0/8 -m state -p tcp --dport 25 --state
NEW -j LOG --log-level 7 --log-prefix "25port: "
... but this is not correct, because vmbr is the bridge.
How I can get traffic logs from virtual interfaces on port 25?
iptables logs kvm smtp
add a comment |Â
up vote
0
down vote
favorite
I have KVM virtualization. I have over 60 interfaces:
vnet1-60 - virtual;
vmbr0 - bridge;
enp2s0f0 - PHYSOUT;
I need to know how many connection make each vnet interface.
I have a rule like:
iptables -A FORWARD -o vnet1 -m state -p tcp --dport 25 --state NEW -j
LOG --log-level 7 --log-prefix "25port: "
... but no result. Same no result:
-A OUTPUT -o vnet*;
-A OUTPUT -o vnet55,vnet56;
-A OUTPUT -o enp2s0f0;
I get logs only when I use this:
-A FORWARD -o vmbr0 -s 123.0.0.0/8 -m state -p tcp --dport 25 --state
NEW -j LOG --log-level 7 --log-prefix "25port: "
... but this is not correct, because vmbr is the bridge.
How I can get traffic logs from virtual interfaces on port 25?
iptables logs kvm smtp
ebtables.netfilter.org/misc/ebtables-faq.html#quiz3
â A.B
May 8 at 14:33
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have KVM virtualization. I have over 60 interfaces:
vnet1-60 - virtual;
vmbr0 - bridge;
enp2s0f0 - PHYSOUT;
I need to know how many connection make each vnet interface.
I have a rule like:
iptables -A FORWARD -o vnet1 -m state -p tcp --dport 25 --state NEW -j
LOG --log-level 7 --log-prefix "25port: "
... but no result. Same no result:
-A OUTPUT -o vnet*;
-A OUTPUT -o vnet55,vnet56;
-A OUTPUT -o enp2s0f0;
I get logs only when I use this:
-A FORWARD -o vmbr0 -s 123.0.0.0/8 -m state -p tcp --dport 25 --state
NEW -j LOG --log-level 7 --log-prefix "25port: "
... but this is not correct, because vmbr is the bridge.
How I can get traffic logs from virtual interfaces on port 25?
iptables logs kvm smtp
I have KVM virtualization. I have over 60 interfaces:
vnet1-60 - virtual;
vmbr0 - bridge;
enp2s0f0 - PHYSOUT;
I need to know how many connection make each vnet interface.
I have a rule like:
iptables -A FORWARD -o vnet1 -m state -p tcp --dport 25 --state NEW -j
LOG --log-level 7 --log-prefix "25port: "
... but no result. Same no result:
-A OUTPUT -o vnet*;
-A OUTPUT -o vnet55,vnet56;
-A OUTPUT -o enp2s0f0;
I get logs only when I use this:
-A FORWARD -o vmbr0 -s 123.0.0.0/8 -m state -p tcp --dport 25 --state
NEW -j LOG --log-level 7 --log-prefix "25port: "
... but this is not correct, because vmbr is the bridge.
How I can get traffic logs from virtual interfaces on port 25?
iptables logs kvm smtp
edited May 8 at 11:28
Rui F Ribeiro
34.5k1269113
34.5k1269113
asked May 8 at 9:38
Mr Vladimir
1
1
ebtables.netfilter.org/misc/ebtables-faq.html#quiz3
â A.B
May 8 at 14:33
add a comment |Â
ebtables.netfilter.org/misc/ebtables-faq.html#quiz3
â A.B
May 8 at 14:33
ebtables.netfilter.org/misc/ebtables-faq.html#quiz3
â A.B
May 8 at 14:33
ebtables.netfilter.org/misc/ebtables-faq.html#quiz3
â A.B
May 8 at 14:33
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
You need to load the br_netfilter
module, and then enable iptables
for bridged traffic, by means of
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
See "What's bridge-netfilter?"
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You need to load the br_netfilter
module, and then enable iptables
for bridged traffic, by means of
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
See "What's bridge-netfilter?"
add a comment |Â
up vote
1
down vote
You need to load the br_netfilter
module, and then enable iptables
for bridged traffic, by means of
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
See "What's bridge-netfilter?"
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You need to load the br_netfilter
module, and then enable iptables
for bridged traffic, by means of
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
See "What's bridge-netfilter?"
You need to load the br_netfilter
module, and then enable iptables
for bridged traffic, by means of
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
See "What's bridge-netfilter?"
answered May 8 at 11:17
Ralph Rönnquist
2,36738
2,36738
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442497%2fiptables-logging-connections-on-port-25-tcp%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
ebtables.netfilter.org/misc/ebtables-faq.html#quiz3
â A.B
May 8 at 14:33