Changes

Jump to: navigation, search

OPS235 Lab 6 - CentOS7 - SSD

599 bytes added, 08:06, 16 June 2016
no edit summary
iptables You can also set exceptions to the default policy for specific IP Addresses by using the options <b><code><span style="pointer-A INPUT events: none;cursor: default;color:#3366CC;font-p tcp size:1.2em;">-m tcp s</span></code></b> or <b><code><span style="pointer-events: none;cursor: default;color:#3366CC;font-sport 80 size:1.2em;">-j ACCEPTs</span></code></b>
iptables -A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT
<table width="100%" cellpadding="10" cellspacing="0" border="1">
<tr>
<td width="50%">'''iptables -A INPUT -p tcp -s 192.168.0.0/24 -sport 22 -j ACCEPT'''</td><td>Set default policy to drop all incoming connections for ALL protocols, ALL communication ports, ALL IP addresses</td>
</tr><tr>
<td>'''iptables -A OUTPUT -p tcp -d 192.168.0.0/24 -dport 80 -j REJECT'''</td><td>Set default policy to drop all outgoing connections for ALL protocols, ALL communication ports, ALL IP addresses</td>
</tr>
</table>
'''iptables -I OUTPUT -p tcp -s0/0 -d 0/0 --dport 80 -j DROP'''
 
 
 
+++ Show iptables command to create policy exceptions +++
'''Perform the following steps:'''
13,420
edits

Navigation menu