mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
02b8045517
Long ago we adapted to iptables changes by introducing support
for '-m conntrack':
commit 06844ccbaa
Author: Stefan Berger <stefanb@us.ibm.com>
Date: Tue Aug 6 20:30:46 2013 -0400
nwfilter: Use -m conntrack rather than -m state
Since iptables version 1.4.16 '-m state --state NEW' is converted to
'-m conntrack --ctstate NEW'. Therefore, when encountering this or later
versions of iptables use '-m conntrack --ctstate'.
Given our supported platform targets, we no longer need to
consider a version of iptables before 1.4.16, so can drop
support for the old syntax.
The test suite updates are triggered because that never
probed for the new syntax, and so unconditionally
generated the old syntax.
Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
88 lines
1.3 KiB
Plaintext
88 lines
1.3 KiB
Plaintext
iptables \
|
|
-w \
|
|
-A FJ-vnet0 \
|
|
-p all \
|
|
-m conntrack \
|
|
--ctstate ESTABLISHED,RELATED \
|
|
-m comment \
|
|
--comment 'out: existing and related (ftp) connections' \
|
|
-j RETURN
|
|
iptables \
|
|
-w \
|
|
-A HJ-vnet0 \
|
|
-p all \
|
|
-m conntrack \
|
|
--ctstate ESTABLISHED,RELATED \
|
|
-m comment \
|
|
--comment 'out: existing and related (ftp) connections' \
|
|
-j RETURN
|
|
iptables \
|
|
-w \
|
|
-A FP-vnet0 \
|
|
-p all \
|
|
-m conntrack \
|
|
--ctstate ESTABLISHED \
|
|
-m comment \
|
|
--comment 'in: existing connections' \
|
|
-j ACCEPT
|
|
iptables \
|
|
-w \
|
|
-A FP-vnet0 \
|
|
-p tcp \
|
|
--dport 21:22 \
|
|
-m conntrack \
|
|
--ctstate NEW \
|
|
-m comment \
|
|
--comment 'in: ftp and ssh' \
|
|
-j ACCEPT
|
|
iptables \
|
|
-w \
|
|
-A FP-vnet0 \
|
|
-p icmp \
|
|
-m conntrack \
|
|
--ctstate NEW \
|
|
-m comment \
|
|
--comment 'in: icmp' \
|
|
-j ACCEPT
|
|
iptables \
|
|
-w \
|
|
-A FJ-vnet0 \
|
|
-p udp \
|
|
--dport 53 \
|
|
-m conntrack \
|
|
--ctstate NEW \
|
|
-m comment \
|
|
--comment 'out: DNS lookups' \
|
|
-j RETURN
|
|
iptables \
|
|
-w \
|
|
-A HJ-vnet0 \
|
|
-p udp \
|
|
--dport 53 \
|
|
-m conntrack \
|
|
--ctstate NEW \
|
|
-m comment \
|
|
--comment 'out: DNS lookups' \
|
|
-j RETURN
|
|
iptables \
|
|
-w \
|
|
-A FJ-vnet0 \
|
|
-p all \
|
|
-m comment \
|
|
--comment 'inout: drop all non-accepted traffic' \
|
|
-j DROP
|
|
iptables \
|
|
-w \
|
|
-A FP-vnet0 \
|
|
-p all \
|
|
-m comment \
|
|
--comment 'inout: drop all non-accepted traffic' \
|
|
-j DROP
|
|
iptables \
|
|
-w \
|
|
-A HJ-vnet0 \
|
|
-p all \
|
|
-m comment \
|
|
--comment 'inout: drop all non-accepted traffic' \
|
|
-j DROP
|