With this /etc/sysconfig/iptables:
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j ACCEPT -s 192.168.3.0/24 -d 10.0.0.0/24
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
My FORWARD chain looks like this:
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 192.168.3.0/24 10.0.0.0/24
Now when I start libvirtd FORWARD chain looks like this:
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere 10.0.0.0/24 ctstate RELATED,ESTABLISHED
ACCEPT all -- 10.0.0.0/24 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
ACCEPT all -- 192.168.3.0/24 10.0.0.0/24
As you can see my rule for 192.168.3.0/24 went after the REJECT.
How do I place the rule for 192.168.3.0/24 in front of REJECT?