Translate

Tuesday, June 10, 2014

Change Linux port and Security

1. Configure ssh to login via port 2243 and disable direct root access to the server.

Check port 2243 allready in use
vi /etc/services  and search port number
Open /etc/ssh/sshd_config and change below lines
Port 2243
PermitRootLogin no

2. Configure iptables in the machine and block port 22 to deny ssh access from 192.168.1.9

iptables -A INPUT -p tcp --dport 2243 -s 192.168.1.42 -j REJECT

No comments:

Post a Comment