Changes

Jump to: navigation, search

OPS235 Lab 6 - CentOS7 - SSD

570 bytes added, 07:32, 16 June 2016
no edit summary
After the overall default policy is set, then you can create policy rules that are "exceptions" to the default policy rules. The <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">-Jj</span></code></b> option is used to redirect (jump) packets to actions (ACCEPT, REJECT, DROP, LOG) if the packet match that policy rule. The option <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">-p</span></code></b> will indicate the protocol used (eg. tcp, upd, icmp). The options <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">--dport</span></code></b> or <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">--sport</span></code></b> indicate the "destination communication port" or "source communication port" respectively. The option <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">-A</span></code></b> is used to append the policy rule to the <u>bottom</u> of the chain. The option <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">-I</span></code></b> is used to insert a policy rule before an existing policy line number (if used with no number, will insert at the <u>top</u> of the chain)
'''Examples:'''
'''iptables -A OUTPUT -p tcp --dport 80 -j DROP'''
13,420
edits

Navigation menu