php no route to host,解决 重启后zerotier无法远程连接,显示”no route to host”

解决 重启后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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值