Saying I have a linux server as a router from LAN to WAN. I don't want any incoming WAN request for safety issue. So how should I block all the incoming request through the WAN interface, but doesn't limit the LAN users' normal internet activity?
Which application should I use? (iptables
?). Which service will be interrupted if I shut up all incoming traffic?
If you really want to block all incoming traffic from the WAN (or Internet), you can simply add a rule like the the following:
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:Of course the
ACCEPT
rule should be added before theDROP
rule. Doing so will prevent you from hosting any service within your network.Will not block incoming traffic. You should add rule on
INPUT
chain, e.g.: