debian禁止或者允许指定ip访问远程mysql、ssh、rsynccat /etc/xinetd.conf

如果没有安装xinetd,安装xinetd  apt-get install xinetd

然后创建配置文件 vi /etc/xinetd.d/mysqld

service login
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/mysqld
instances = 20
}

然后重启服务 /etc/init.d/xinetd restart

查看状态 /etc/init.d/xinetd status

修改hosts.allow和hosts.deny文件 vim /etc/hosts.allow

ALL: 127.0.0.1 

vim /etc/hosts.deny

mysqld:ALL

然后设置开机启动,在 /etc/rc.local 增加 /usr/bin/mysqld --daemon