Open main menu

CDOT Wiki β

Changes

OPS335 Lab 2

91 bytes added, 08:15, 24 January 2016
no edit summary
# Remove the rules in your '''INPUT''' chain that are allowing all '''icmp''' and '''ssh''' traffic.
# Change the '''default policy''' on the '''INPUT''' and '''FORWARD''' chains in the filter table to '''DROP'''.
# Remove the rules from the '''INPUT''' and '''FORWARD''' chains that are rejecting all traffic (we are now better protected by the ''default policy'').<br><br>We will now create a new chain called "MYSSH" and in order to create rules just relating to the '''ssh''' service:<br><br>
# Create a new chain named '''MYSSH''' in the filter table. Refer to notes or other resources to learn now to name a chain.
# Add a rule to the beginning of the '''INPUT''' chain of your filter table that sends all '''ssh''' traffic (i.e. tcp packets with destination port 22) to your '''MYSSH''' chain.
#* '''Note:''' Use '''--jump''' or '''-j''' (<u>not</u> --goto) to move to a target.
# Add a rule to your '''MYSSH''' chain to accept all traffic on your virtual interface from '''192.168.X.0/24''' (i.e. your internal network).
# Add rules to the '''end of the MYSSH chain''' to drop all remaining '''ssh''' connections, but to log these denied packets with log level 'info' and log prefix "DENIED BY MYSSH" before doing so.<br><br>Let's create a new chain to create rules relating only to the '''icmp''' service:<br><br>
# Make a new chain named '''MYICMP'''.
# Add a rule to the beginning of the '''INPUT''' chain to send '''ICMP''' ping packets to your '''MYICMP''' chain.
13,420
edits