Open main menu

CDOT Wiki β

Changes

OPS235 Lab 7 - CentOS7

6 bytes removed, 13:28, 7 July 2015
no edit summary
# <u>Restart</u> the service.
# Confirm the new port is being used with the '''netstat''' command.
# Before we can use this new port we must change our firewall to allow traffic through the new port number and block access to port 22 by issuing the command:<br /><b><code><span style="color:#3366CC;font-size:1.2em;">iptables -I INPUT -p tcp -s0/0 --dport 2200 -j ACCEPT</span></code></b><code>
# Next, we will drop any incoming traffic to port 22 by issuing the command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">iptables -I INPUT -p tcp -s0/0 --dport 22 -j DROP</span></code></b>
# We have now possibly mislead a potential "hacker" to the true port for our ssh server's communication channel (port). To test the new port connect to '''centos1''' from '''centos2''' using the following command:<br /><b><code><span style="color:#3366CC;font-size:1.2em;">ssh -p 2200 user@centos1</span></code></b>
13,420
edits