-
Notifications
You must be signed in to change notification settings - Fork 2
Sysadmin papilusion sshd port 19 07 2012
yannouk edited this page Jul 19, 2012
·
1 revision
Port 22 only for OVH access (firewall filtered) Public port changed to 65422
- user : root
- host : papilusion.reverse.seizam.com
- date : 19/07/12 09:13
- curpath : /root
- Edit /etc/ssh/sshd_config, see [1]
[email protected]# /etc/init.d/ssh reload [email protected]# iptables -L -v --line-numbers
- add access SSHD port 22 for ovh
[email protected]# iptables -A INPUT -i eth0 -p tcp --dport 22 --source 213.186.50.100 -j ACCEPT [email protected]# iptables -L -v --line-numbers
- add access SSHD port 65422 for everyone
[email protected]# iptables -A INPUT -p tcp --dport 65422 -j ACCEPT [email protected]# iptables -L -v --line-numbers
- remove everyone access to port 22
[email protected]# iptables -D INPUT 3 [email protected]# iptables -L -v --line-numbers
- save firewall config
[email protected]# iptables-save -c > /etc/iptables.rules
[1]\* Edit /etc/ssh/sshd_config
--- old 2012-07-19 09:13:39.000000000 +0000 +++ new 2012-07-19 09:14:25.000000000 +0000 @@ -5,2 +5,3 @@ Port 22 +Port 65422 # Use these options to restrict which interfaces/protocols sshd will bind to