LINUX 挖矿终极解决方案,白名单限制IP地址
允许访问
vi /etc/hosts.allow
添加(可以添加多行,其中“:allow”可以省率)
sshd:192.168.31.*:allow #表示192.168.31.* ip段都能ssh访问
sshd:192.168.31.200:allow #表示192.168.31.200 ip段都能ssh访问
sshd:192.168.31.201:allow
sshd:all:allow #表示允许所有ip 的ssh访问
拒绝访问
vi /etc/hosts.deny
sshd:all:deny #表示拒绝所有ip访问
sshd:192.168.31.*:deny #表示拒绝192.168.31.* ip段所有ssh访问
sshd:192.168.31.201 #表示拒绝192.168.31.201主机ssh访问
重启服务器
yum -y install xinetd
systemctl enable xinetd.service #--开机启用xinetd服务
systemctl start xinetd.service
systemctl status xinetd.service

浙公网安备 33010602011771号