(private 172.19.31.101/public 140.111.79.51)
因為我們學校的網路環境 對內是private IP 對外才是public IP
在實驗室的別台電腦(A)用pietty/putty和browser可以連到172.19.32.101
可是卻沒辦法在(A)用pietty/putty和browser連140.111.79.51
回到家之後
我可以用家裡的電腦(B)用browser連到140.111.79.51
可是卻沒辦法在(B)用pietty/putty連到140.111.79.51
一直給我network error: connection timed out
而且ping 140.111.79.51一直是request timed out
debian的網路環境如下
ifconfig
- 代碼: 選擇全部
eth0 Link encap:Ethernet HWaddr 00:10:B5:D4:BD:D3
inet addr:172.19.32.101 Bcast:172.19.32.255 Mask:255.255.255.0
EtherTalk Phase 2 addr:65280/59
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:249009 errors:0 dropped:0 overruns:0 frame:0
TX packets:137544 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:170259050 (162.3 MiB) TX bytes:17613628 (16.7 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
EtherTalk Phase 2 addr:0/0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:112 errors:0 dropped:0 overruns:0 frame:0
TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:24980 (24.3 KiB) TX bytes:24980 (24.3 KiB)
/etc/network/interfaces
- 代碼: 選擇全部
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 172.19.32.101
netmask 255.255.255.0
network 172.19.32.0
broadcast 172.19.32.255
gateway 172.19.32.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 172.19.1.1
dns-search niu.edu.tw
iptables -L
- 代碼: 選擇全部
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
netstat -a | grep ssh
- 代碼: 選擇全部
tcp 0 0 *:ssh *:* LISTEN
cat /etc/hosts
- 代碼: 選擇全部
127.0.0.1 localhost.localdomain localhost
172.19.32.101 dspic.niu.edu.tw dspic
/etc/hosts.allow 和 /etc/hosts.deny都是沒有內容
真的是有夠怪~