SSH访问不了特定网段

SSH访问不了172.20.70.240原因是第一个路由不是172.20.70.1  

[root@sshbridge ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.56.1    0.0.0.0         UG    100    0        0 enp0s8
0.0.0.0         172.20.70.1     0.0.0.0         UG    101    0        0 enp0s3
172.20.70.0     0.0.0.0         255.255.255.0   U     100    0        0 enp0s3
192.168.56.0    0.0.0.0         255.255.255.0   U     100    0        0 enp0s8

解决方法:停掉 enp0s8 再启动 enp0s8
[root@sshbridge ~]# ifdown enp0s8
Device 'enp0s8' successfully disconnected.
[root@sshbridge ~]# ifup enp0s8
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)
[root@sshbridge ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.20.70.1     0.0.0.0         UG    100    0        0 enp0s3
0.0.0.0         192.168.56.1    0.0.0.0         UG    101    0        0 enp0s8
172.20.70.0     0.0.0.0         255.255.255.0   U     100    0        0 enp0s3
192.168.56.0    0.0.0.0         255.255.255.0   U     100    0        0 enp0s8
[root@sshbridge ~]# ping www.baidu.com
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=1 ttl=50 time=6.81 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=2 ttl=50 time=7.51 ms
64 bytes from 14.215.177.39 (14.215.177.39): icmp_seq=3 ttl=50 time=6.50 ms
^C
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 6.505/6.946/7.514/0.421 ms
[root@sshbridge ~]# ping 192.168.56.133
PING 192.168.56.133 (192.168.56.133) 56(84) bytes of data.
64 bytes from 192.168.56.133: icmp_seq=1 ttl=64 time=0.047 ms
64 bytes from 192.168.56.133: icmp_seq=2 ttl=64 time=0.049 ms
^C
--- 192.168.56.133 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.047/0.048/0.049/0.001 ms
[root@sshbridge ~]# 
[root@sshbridge ~]# 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值