網站打不開,ssh連不上,這是很多站長的痛。下面例舉3種方法,判斷IP是不是被屏蔽了。
1,路由分析法
# traceroute 212.239.8.22 //linux下
traceroute to 212.239.8.22 (212.239.8.22), 30 hops max, 60 byte packets
1 192.168.10.1 (192.168.10.1) 0.308 ms 0.515 ms 0.634 ms
2 * * *
3 124.74.57.93 (124.74.57.93) 5.325 ms 5.314 ms 5.310 ms
4 101.95.42.177 (101.95.42.177) 5.219 ms 5.222 ms 5.214 ms
5 61.152.86.178 (61.152.86.178) 6.495 ms 6.604 ms 6.596 ms
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
F:\test> tracert 212.239.8.22 //windows下
在IP查詢工具查一下,會發現,61.152.86.178是上海 電信骨幹網,到這兒就不通了。只能說被它屏蔽掉了
2,登入牆外VPS,ping 212.239.8.22,這個方法的前提是你有二個牆外VPS,並且沒有同時被封。如果牆外ping的通,牆內ping不通,說明被屏蔽了。
3,如果利用VPN或代理能夠訪問,不用就是不能訪問,說明被牆了。
補充:L
首先查看當前規則:
iptables --list
[root@joytest1 ~]# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- xxxx.xxxx.50.45 anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT icmp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:svn
ACCEPT tcp -- anywhere anywhere tcp dpt:pptp
ACCEPT gre -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp dpt:domain
DROP all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ni-ftp
增加:
iptables -A INPUT -s xxx.xx.xxx.xxx -j ACCEPT
重啟服務
service iptables restart