サーバーをインターネットに接続中に問題が発生しました。

サーバーをインターネットに接続中に問題が発生しました。

私はLinuxサーバーを設定しました。しかし、現在外の世界への接続に問題があります。 wget、apt-get、またはpingを実行できません。以下はいくつかの関連情報です。

$ping google.com
ping: unknown host google.com

cat /etc/resolv.conf

search dmust.local
nameserver 198.154.126.1

vim /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 198.154.126.179
        netmask 255.255.255.0
        network 198.154.126.0
        broadcast 198.154.126.255
        gateway 198.154.126.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 198.154.126.1
        dns-search dmust.local

修正する

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
198.154.126.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         198.154.126.1   0.0.0.0         UG    100    0        0 eth0

grep '^hosts' /etc/nsswitch.conf
hosts:          files dns

ベストアンサー1

構成から無効なネームサーバーを削除する必要があります。

確認するhttps://help.ubuntu.com/12.10/serverguide/network-configuration.html#name-solutionより多くの情報を知りたいです。

Googleの無料ネームサーバーを使用するには、/etc/network/interfacesファイルを次のように編集します。

削除する:

DNSネームサーバー198.154.126.1

次に追加:

DNSネームサーバー8.8.4.4 8.8.8.8

次に、次のようにネットワークインターフェイスを再起動します。

$ sudo /etc/init.d/networking 再起動

おすすめ記事