我刚刚搬家,搬家后我收到了一个新的 DSL 调制解调器。我已将其设置为透明桥,因为我有一个内部路由器。这就像我以前做的一样,只是我摆脱了静态 IP。我将我的 Ubuntu 服务器更改为 DHCP。我可以访问 LAN 上的任何系统,甚至可以 ping 它们。我没有 WAN 访问权限。系统上还有其他三台 Windows 机器,它们都可以使用 WAN。我有以下信息:
ifconfig
eth0 Link encap:Ethernet HWaddr 90:2b:34:83:19:99
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::922b:34ff:fe83:1999/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26551 errors:0 dropped:0 overruns:0 frame:0
TX packets:3720 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2277376 (2.2 MB) TX bytes:315728 (315.7 KB)
Interrupt:41 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1152 errors:0 dropped:0 overruns:0 frame:0
TX packets:1152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:340833 (340.8 KB) TX bytes:340833 (340.8 KB)
virbr0 Link encap:Ethernet HWaddr 6a:6b:63:67:72:ce
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default APT 0.0.0.0 UG 100 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0
ping LAN:
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.666 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.652 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.608 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.622 ms
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.608/0.637/0.666/0.023 ms
ping WAN:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3022ms
/etc/resolv.conf shows:
**# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# **DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1****
/etc/network/interfaces shows:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The primary network interface
auto eth0
iface eth0 inet dhcp
# The loopback network interface
auto lo
iface lo inet loopback
gateway 192.168.1.1
有什么帮助吗?我对此真的很沮丧。
答案1
以下是我将采取的几个步骤:
- 检查输出
iptables -L
以确保您没有设置防火墙。 APT
对看似是您的路由器 (192.168.1.1) 进行 Ping 。- 如果您已经安装
traceroute
或mtr
正在使用,请尝试使用它来找出被阻止的位置。我使用mtr -ni5 8.8.8.8
。 - 使用类似命令检查 DNS
host google.com
。 - 检查
/etc/resolv.conf
以确保其具有合理的数据。