SSH IP blocking?

Owen Townend owen.townend at gmail.com
Wed Apr 9 17:49:07 UTC 2008


On 10/04/2008, Keith Clark <keithclark1966 at rogers.com> wrote:
>
> Is there a way to block ip addresses from attempting ssh connections?  I
> noticed in my auth.log a few people trying to gain access over and over
> again and would like to stop them.
>
> Thanks,
>
> Keith


Hey
  Have a look into /etc/hosts.deny
  There is a man page for it that describes the syntax which includes
IP/mask and FQDN. e.g.:
sshd: .au 192.168.1.0/24 *owen*
  This would block all domain names ending in .au, the IP range 192.168.1.x
and any domain name with 'owen' in it.
  An alternative would be to use 'sshd: ALL' in hosts.deny and selectively
open access using hosts.allow

cheers,
Owen.

--
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080410/b9862d50/attachment.html>


More information about the ubuntu-users mailing list