Ubuntu 错误/错误,其中所有 DNS 记录都具有相同的奇怪 IP 类别

Ubuntu 错误/错误,其中所有 DNS 记录都具有相同的奇怪 IP 类别

首先,我想说我对 Ubuntu 并不陌生,我主要将其用作网关服务器。我有一个没有 GUI 的 Ubuntu 12.04 LTS 服务器。

这几天,一场大风暴过后,我家停电了。当电来的时候,一切都很好,直到我发现了问题所在。

root@ubuntu:~# uname -a
Linux ubuntu 3.2.0-49-generic-pae #75-Ubuntu SMP Tue Jun 18 18:00:21 UTC 2013 i686 i686 i386 GNU/Linux

这就是问题:

root@ubuntu:~# nslookup google.com
Server: 192.168.1.254
Address: 192.168.1.254#53
Name: google.com
Address: 198.18.1.13

root@ubuntu:~# nslookup yahoo.com
Server: 192.168.1.254
Address: 192.168.1.254#53
Name: yahoo.com
Address: 198.18.1.14

root@ubuntu:~# nslookup ubuntu.com
Server: 192.168.1.254
Address: 192.168.1.254#53
Name: ubuntu.com
Address: 198.18.1.24

问题是,即使 PHP 函数file_get_contents不起作用gethostbyname,它们在查询时也给我相同的 IP 类。

其他效果:

root@ubuntu:~# ping google.com
PING google.com (198.18.1.13) 56(84) bytes of data.
^C
--- google.com ping statistics ---
23 packets transmitted, 0 received, 100% packet loss, time 22173ms  

root@ubuntu:~# apt-get update
0% 
[Connecting to it.archive.ubuntu.com (198.18.1.19)] 
[Connecting to security.ubuntu.com (198.18.1.18)] 
[Connecting to archive.canonical.com (198.18.1.17)] 
[Connecting to ppa.launchpad.net (198.18.1.16
...
...
W: Failed to fetch http://it.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/i18n/Translation-en  
Unable to connect to it.archive.ubuntu.com:http:
E: Some index files failed to download. They have been ignored, or old ones used instead.

我的网络配置如下:

internet--adsl router--ubuntu gw--switch lan/wifi--computers  

adsl 路由器与提供商有 pppoe 连接,其 ip 为 192.168.1.254

ifconfigUbuntu 运行和后输出如下route -n

root@ubuntu:~# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:10:b5:f9:d4:76
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::210:b5ff:fef9:d476/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:540782 errors:0 dropped:0 overruns:0 frame:0
          TX packets:327646 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:731616835 (731.6 MB)  TX bytes:26098933 (26.0 MB)
          Interrupt:17 Base address:0x3000**

eth1      Link encap:Ethernet  HWaddr 00:e0:4c:3a:5d:a2
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:4cff:fe3a:5da2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:313887 errors:0 dropped:0 overruns:0 frame:0
          TX packets:526813 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:25127774 (25.1 MB)  TX bytes:730199162 (730.1 MB)
          Interrupt:18 Base address:0x3400**

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:728 errors:0 dropped:0 overruns:0 frame:0
          TX packets:728 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:41363 (41.3 KB)  TX bytes:41363 (41.3 KB)

root@ubuntu:~# route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    100    0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

不用说,在我的局域网中一切运行顺利,例如:

C:\Users\Leon>ping google.com
Pinging google.com [74.125.232.136] with 32 bytes of data:
Reply from 74.125.232.136: bytes=32 time=27ms TTL=53
Reply from 74.125.232.136: bytes=32 time=25ms TTL=53
Reply from 74.125.232.136: bytes=32 time=28ms TTL=53
Reply from 74.125.232.136: bytes=32 time=24ms TTL=53
Ping statistics for 74.125.232.136:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 24ms, Maximum = 28ms, Average = 26ms

所以这就是问题所在。这可能是 2-3 天前的最后一次更新造成的,我是在断电后才发现这个问题的,也可能是断电造成的,尽管我对此表示怀疑,因为使用 ext4 和 jbd2 我觉得可以在一定程度上防止数据丢失。

谢谢您的回答。如果您还有其他问题,我会尽快回复。

答案1

您不是恰巧位于 Technicolor 路由器后面吗? https://community.plus.net/forum/index.php/topic,134916.msg1181609.html#msg1181609

582n 有一个“DNS 欺骗列表”,这是它缓存 DNS 故障的方式,通过将其转换为 198.18 地址。很疯狂,但我刚刚在自己的连接上看到了它。

这些是保留地址:

NetRange:       198.18.0.0 - 198.19.255.255
CIDR:           198.18.0.0/15
NetName:        SPECIAL-IPV4-BENCHMARK-TESTING-IANA-RESERVED
NetHandle:      NET-198-18-0-0-1
Parent:         NET198 (NET-198-0-0-0-0)
NetType:        IANA Special Use
OriginAS:
Organization:   Internet Assigned Numbers Authority (IANA)
RegDate:        1992-11-23
Updated:        2013-08-30
Comment:        Addresses starting with "198.18." or "198.19." are set aside for use in isolated laboratory networks used for benchmarking and performance testing.  They should never appear on the Internet and if you see Internet traffic using these addresses, they are being used without permission.
Comment:
Comment:        This assignment was made by the IETF, the organization that develops Internet protocols, in RFC 2544, which can be found at:
Comment:        http://datatracker.ietf.org/doc/rfc2544
Ref:            http://whois.arin.net/rest/net/NET-198-18-0-0-1

答案2

问题仍然存在,并且 askubuntu 社区没有给出任何答复,今天我花了一点时间尝试解决这个问题......

我已经重新创建了所有绑定配置,但没有效果,嗯,有些效果是的,但是没有人修复错误......

最后很明显,问题出在绑定上......所以我最终找到了错误:

该文件是

/etc/default/bind9

我进行了编辑并在其中发现我有:

# run resolvconf?
RESOLVCONF=no

# startup options for the server
OPTIONS="-u bind"

进行了编辑,以便我可以:

 RESOLVCONF=yes

现在一切都按照服务器预期的那样进行……

附言:如果有人知道断电如何会产生这样的影响,那就是我的任务 :)。如果你查看该文件,你能告诉我你的默认值是什么吗?谢谢

相关内容