SBDavid
Oct 13th, 2009
Oct 13th, 2009
Basic iptables Firewall policies (-P)
Basic iptables Firewall policies (-P)
The following rules block all incoming and outgoing packets on a network gateway:
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P OUTPUT DROP
Forwarded packets denied. To do this, use the following rule:
iptables -P FORWARD DROP
After setting the policy chains, you can create new rules for your particular network and security requirements.
Establishing basic firewall policies creates a foundation for building more detailed, user-defined rules. iptables uses policies (-P) to create default rules.