问题:
我在校园网络上有一台计算机,可以通过ssh代理服务器从外部访问。
home --> proxy --> my computer
计算机有第二个网卡,所以我把它连接到一些设备,为此,我编辑/etc/network/interfaces,为第二个NIC分配了一个静态IP地址和网络掩码,并添加了一个路由:
auto eno1
iface eno1 inet static
address 192.168.1.1
netmask 255.255.255.0
up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev eno1
NIC启动后,我无法使用ping或ssh通过代理连接到计算机,
我还注意到,即使第二个NIC启动,我也可以通过此路由连接到电脑:
home --> proxy --> another server on campus network --> my computer
No matter the second NIC is up or down, the computer can always access internet.
答案1:
两个接口的IP地址/网络掩码有助于诊断问题。
尝试将route -n
的输出
- 添加的路由正在中断远程访问
相关文章