Difference between revisions of "Iptables: Explanations, options & examples"
Jump to navigation
Jump to search
| Line 21: | Line 21: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | == Structure of | + | == Structure of /etc/sysconfig/iptables == |
| + | iptables includes 3 default tables: | ||
| + | * <code>*filter</code> - Default table for filtering packets | ||
| + | * <code>*nat</code> - Default table for Network Address Translation | ||
| + | * <code>*mangle</code> - Default table used for specific type of packet alteration | ||
Revision as of 13:38, 15 November 2012
Configuration file location and command commands
Configuration file
The iptables configuration file is located at: /etc/sysconfig/iptables. The contains all the tables, chains and rules. Additional configurations can be added directly to this file or via command line tools.
Common Commands
# start iptables
service iptables start
# get current status
service iptables status
# stop iptables
service iptables stop
# restart iptables
service iptables restart
# save any newly added rules
service iptables saveStructure of /etc/sysconfig/iptables
iptables includes 3 default tables:
*filter- Default table for filtering packets*nat- Default table for Network Address Translation*mangle- Default table used for specific type of packet alteration