Fail2Ban port number for SSH
Posted: Sat Nov 15, 2014 11:30 am
So as most of you I am running shell access on an alternative port, let's say 2220 as an example.
Fail 2 band is listening for attempts on ssh via the ssh port number right? IE 22? How do I change this to the port number sshd is listening on so I can prevent brute force attempts on my box.
I have amended jail.conf to say:
[ssh-iptables]
enabled = true
filter = sshd
action = iptables[name=SSH, port=2220, protocol=tcp]
sendmail-whois[name=SSH, dest=[email protected], sender=[email protected], sendername="Fail2Ban"]
logpath = /var/log/secure
maxretry = 5
And restarted the service but I can still hammer ssh with Hydra. Any ideas guys?
Thanks.
Fail 2 band is listening for attempts on ssh via the ssh port number right? IE 22? How do I change this to the port number sshd is listening on so I can prevent brute force attempts on my box.
I have amended jail.conf to say:
[ssh-iptables]
enabled = true
filter = sshd
action = iptables[name=SSH, port=2220, protocol=tcp]
sendmail-whois[name=SSH, dest=[email protected], sender=[email protected], sendername="Fail2Ban"]
logpath = /var/log/secure
maxretry = 5
And restarted the service but I can still hammer ssh with Hydra. Any ideas guys?
Thanks.