I was trying to limit the locations that could access my network through port 22 by IP.  I was able to do it using this method.

To limit ssh access to a linux box based on originating IP address, edit /etc/hosts.allow:

sshd : localhost : allow
sshd : 192.168.0. : allow
sshd : : allow
sshd : mydomain.net : allow
sshd : ALL : deny

© 2023. All Rights Reserved.

Proudly published with Ghost