rsync 提示错误:rsync: failed to connect to x.x.x.x No route to host (113)
,原因是没有开启端口,默认是 873。解决办法如下:
firewall
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="允许的ip" port protocol="tcp" port="873" accept" #开放端口
systemctl restart firewalld #重启防火墙
Iptables
iptables -I INPUT -s 允许的ip -tcp --dport 873 -j ACCEPT #开放端口
service iptables save #保存设置
service iptables restart #重启防火墙