How to block all incoming request through one network interface?
If you really want to block all incoming traffic from the WAN (or Internet), you can simply add a rule like the the following:
$ iptables -A INPUT -i eth0 -j DROP
assuming eth0
is the WAN interface. This is enough to block all incoming traffic. However, you need to allow all related/established connections to be able to request some service from the WAN/Internet. So, you need a rule like:
$ iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
Of course the ACCEPT
rule should be added before the DROP
rule. Doing so will prevent you from hosting any service within your network.
iptables -A FORWARD -i eth0 -j DROP
Will not block incoming traffic. You should add rule on INPUT
chain, e.g.:
iptables -A INPUT -i eth0 -j DROP