We want to block all access to SSH, except for two IP addresses. One address is dynamic, it starts with 124.567.890.xxx where xxx is changing all the time. I read that you can do this by changing /etc/hosts.allow
? How can we do this?
1 Answer
This should be as trivial as
sshd : 124.567.890. : allow
-
-
1
-
1In /etc/hosts.deny, you'll need to put in "sshd: ALL", so your combined rule will be deny all, allow X.– cjcDec 31, 2011 at 10:29
-
Thanks, and how can I test the security? We only have one IP address right here.– KevinDec 31, 2011 at 10:33
-
Is this relevant to your question? serverfault.com/questions/185153/…– SergeiDec 31, 2011 at 10:52