CentOS / RHEL : iptables troubleshooting guide – The Geek
iptables-save >/some/file. will save your iptables configuration to /some/file. and . iptables-restore
An In-Depth Guide to iptables, the Linux Firewall
7. Using iptables. iptables has a fairly detailed manual page (man iptables), and if you need more detail on particulars.Those of you familiar with ipchains may simply want to look at Differences Between iptables and ipchains; they are very similar. iptables-save > /etc/iptables/rules.v4 ip6tables-save > /etc/iptables/rules.v6 Note: This HOWTO had been contributed by user Geejay to wiki.openvz.org as a part of installing container howto. See also
Iptables is an IP filter, and if you don't fully understand this, you will get serious problems when designing your firewalls in the future. An IP filter operates mainly in layer 2, of the TCP/IP reference stack. Iptables however has the ability to also work in layer 3, which actually most IP filters of today have.
iptables - How to Set Up Linux Server As A Router with NAT iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE --random Configure forwarding rules. By default, iptables will forward all traffic unconditionally. You probably want to restrict inbound traffic from the internet, but allow all outgoing: Linux Howtos: Security -> iptables-tutorial