Changes

Jump to: navigation, search

OPS235 Lab 7 - CentOS7 - HD2

705 bytes added, 17:39, 24 October 2016
no edit summary
</table>
:'''Perform the following steps:'''
# Issue the following Linux command: <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.2em;">iptables -P INPUT DROP</span></code></b># Issue the iptables command verify the INPUT policy has been set.<br><br>After the overall default policy is set, then you can create policy rules that are "exceptions" to the default policy rules. These iptables commands are more complex since you need to determine: <ul><li>Where each rules appears in the chain (order can be important)</li><li>Which protocol(s) are affected (eg. tcp, udp, icmp)</li><li>What source or destination IP Addresses are affected?</li><li>What port numbers are affected?</li><li>What action to take if all of the above conditions are met? (eg. ACCEPT, REJECT, DROP, or LOG)</li></ul><br>     The <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.5em;">-j</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.5em;">-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.5em;">--dport</span></code></b> or <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.5em;">--sport</span></code></b> indicate the "destination communication port" or "source communication port" respectively. You can view the file '''/etc/services''' to determine the communication port number for the appropriate network service. The option <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-size:1.5em;">-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.5em;">-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:'''
13,420
edits

Navigation menu