Changes

Jump to: navigation, search

IPTables

1,290 bytes added, 15:40, 22 November 2010
Sample Scripts from our Lab Material
The intended audience for this document is Andrew Grimo's the OPS235 linux admin class. It is a guide to Iptables iptables in the context of what OPS235 is currently studying and therefore a variety of its complexities will not be explored here. All are welcome to reference this document and refine what it is trying to convey to be more accurate or precise.
This is an outline of
* how Iptables iptables command lines are structured and understood
* an explanation of the rule specifications that we use
* sample commands that can be seen in the labs to relate to this document
=== INPUT Chain ===
<pre> dest. src. --------- --------- ---------- | routing localhost Local process|F12Host|>-wire--->eth0|Fedora2|->eth0 -> decision --> INPUT chain -->filtering --> or application--------- | is made \ of rules ------------------- is made \ of rules \
some routed elsewhere
or sent to FORWARD chain
=== OUTPUT Chain ===
<pre>
src.
---------------------- dest.
| Local process routing localhost ---------
|Fedora2 --> or applicaiton -> decision-> OUTPUT chain -->filtering-> eth0-> wire->|F12Host|
| is made of rules interface ---------
----------------------
</pre>
== Sample Scripts from our Lab Material ==
== Sample Scripts <pre> # iptables -F // flushes the rules from our Lab Material ==the table # iptables -L // lists the rules running in memory # iptables -P INPUT DROP // creates a policy to DROP packets inbound # iptables -A OUTPUT -j LOG // logs outgoing traffic to /var/log/messages # iptables -I 1 OUTPUT -p tcp -s 0/0 -d 0/0 --dport 80 -j DROP // drop outbound web // requests and inserts // at line 1 in the chain  # iptables -I INPUT 3 -p tcp -s 192.168.235.0/24 -d f12host --dport ssh -j DROP </pre>
1
edit

Navigation menu