This is what I have specified as a default rule in my iptables firewall script:
iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT
I have many interfaces and many networks and NATing where traffic should get forwarded, so I have made
FORWARD ACCEPT as default rule. And next I have this:
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j SNAT --to-source 188.8.131.52
And at the end I have this:
iptables -A INPUT -i eth0 -j DROP
DROP rule should drop only packets directed to the gateway host. Whatever traffic that comes in via
eth0 to be forwared should not get affected.
My question is, if I have a
INPUT DROP rule for an interface, whether it will affect the
FORWARD chains on the same interface (or the global
FORWARD ACCEPT chain)?