赞
踩
解决 重启后zerotier无法远程连接,显示”no route to host”
第一步: 禁用桌面环境,桌面环境重启时经常会无原无故卡住.导致远程连不上.
systemctl set-default graphical.target
第二步: zerotier-one -d 重启时报错 “cannot bind to local control interface port”
禁用桌面环境,重启后,啥都不要做就已经可以了.
systemctl stop zerotier-one //关闭zerotier
systemctl status zerotier-one //显示是否已启动
systemctl restart zerotier-one //重新启动
以下增加防火墙命令全部删了也没影响.
备注1. 这个网站写的经验 —- 这命令不需要用
[https://github.com/zerotier/ZeroTierOne/issues/411]
modprobe tun
killall zerotier-one
zerotier-one -d //这个有时报错时,我就用systemctl restart zerotier-one 或 service zerotier-one restart
备注2. 侦察是否启动成功 —- 这命令不需要用
killall -9 zerotier-one //杀死zerotier所有进程
netstat -lp | grep zero //查看9993端口是否被占用
zerotier-cli listpeers //检查是否找到Moon, PLANET服务器
zerotier-cli info //是否在线信息
zerotier-cli listnetworks //列出连接的zerotier网络
备注3. 只要找到MOON的IP就已经成功 —- 这命令不需要用
zerotier-cli listpeers //只要找到MOON的IP就已经成功
200 listpeers 2c45e637cf 121.196.179.9/9993;6;7 20 1.4.6 MOON
200 listpeers 3a46f1bf30 - -1 - PLANET
200 listpeers 62f865ae71 - -1 - PLANET
200 listpeers 778cde7190 - -1 - PLANET
200 listpeers 992fcf1db7 - -1 - PLANET
200 listpeers c7c8172af1 - -1 1.4.6 LEAF
200 listpeers e50eb021f5 - -1 1.4.6 LEAF
备注4. 关于防火墙 —- 这命令不需要用
systemctl status firewalld.service -l //错误时返回的信息
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete FORWARD --destination
192.168.122.0/24 --out-interface virbr0 --match conntrack --ctstate ESTABLISHED,RELATED --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist
in that chain?).
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete FORWARD --source
192.168.122.0/24 --in-interface virbr0 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete FORWARD --in-interface
virbr0 --out-interface virbr0 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete FORWARD --out-interface
virbr0 --jump REJECT' failed: iptables: No chain/target/match by that name.
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete FORWARD --in-interface
virbr0 --jump REJECT' failed: iptables: No chain/target/match by that name.
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete INPUT --in-interface
virbr0 --protocol udp --destination-port 53 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete INPUT --in-interface
virbr0 --protocol tcp --destination-port 53 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete OUTPUT --out-interface
virbr0 --protocol udp --destination-port 68 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete INPUT --in-interface
virbr0 --protocol udp --destination-port 67 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
Sep 21 13:32:03 localhost.localdomain firewalld[3920]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w2 -w --table filter --delete INPUT --in-interface
virbr0 --protocol tcp --destination-port 67 --jump ACCEPT' failed: iptables: Bad rule (does a matching rule exist in that chain?).
systemctl status firewalld.service -l //正确时返回的信息
Sep 21 18:20:14 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Sep 21 18:20:15 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Sep 21 18:20:15 localhost.localdomain firewalld[845]: WARNING: ICMP type 'beyond-scope' is not supported by the kernel for ipv6.
Sep 21 18:20:15 localhost.localdomain firewalld[845]: WARNING: beyond-scope: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Sep 21 18:20:15 localhost.localdomain firewalld[845]: WARNING: ICMP type 'failed-policy' is not supported by the kernel for ipv6.
Sep 21 18:20:15 localhost.localdomain firewalld[845]: WARNING: failed-policy: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
Sep 21 18:20:15 localhost.localdomain firewalld[845]: WARNING: ICMP type 'reject-route' is not supported by the kernel for ipv6.
Sep 21 18:20:15 localhost.localdomain firewalld[845]: WARNING: reject-route: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time.
增加防火墙命令 – 这些命令删了也没影响
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="172.26.0.0/16" service name="ssh" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="121.196.179.9" service name="ssh" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="172.26.9.133" service name="ssh" accept'
firewall-cmd --zone=public --permanent --add-interface=zt5u4qbuhh
firewall-cmd --reload
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。