Wednesday, December 17, 2008

Quik Note: iptables

  • iptables -t filter -nL display all the chain rules
  • iptables -nL
  • iptables -t nat -L show all chain rules NAT-table
  • iptables -t filter -F clear all the rules in the chain of filter-table
  • iptables -t nat -F clear all the rules in the chain of NAT-table
  • iptables -t filter -X remove all user-chain rules in filter-table
  • iptables -t filter -A INPUT -p tcp --dport telnet -j ACCEPT allow telnet incoming connection
  • iptables -t filter -A OUTPUT -p tcp --dport http -j DROP block http outcoming connection
  • iptables -t filter -A FORWARD -p tcp --dport pop3 -j ACCEPT allow forwarding

No comments: