Few of very simple steps
1) Login using root
2) Enter following command to open port in iptables
1 |
iptables -A INPUT -p tcp --dport 25 -j ACCEPT |
3) Enter following command to close port in iptables
1 |
iptables -A INPUT -p tcp --dport 25 -j DROP |
4) Save iptables
1 |
service iptables save OR /etc/init.d/iptables save |
5) Restart iptables
1 |
service iptables restart OR /etc/init.d/iptables restart |
[…] If you are running iptables, then dont forget to open that port in iptables before you change it in sshd_config Tags: Centos, How to, linux, openssh, redhat, secure, ssh […]