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 : 99.151.250.7 : allow
sshd : mydomain.net : allow
sshd : ALL : deny

© 2020. All Rights Reserved.

Proudly published with Ghost