Linux服务器的远程IP限制

系统环境:

Linux-centOS+ubuntu

操作:

编辑允许通过IP

路径:vim /etc/hosts.allow

sshd:192.168.1.1

编辑禁止通过IP

路径:vim /etc/hosts.deny

sshd:all

重启网络服务

/etc/rc.d/init.d/network restart
或者
service network restart  

以上。

IP限制往往搭配代理服务器混合使用,目的是比安全更安全!

代理服务器相关搭建及配置【点击进入】

原文地址:https://www.cnblogs.com/kaneyang/p/6861301.html