I just have setup a Linux server. But currently I am having problem in connecting to the outside world. I am not able to do wget,apt-get or ping. Here ar some relevant details:
$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
Update
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
route -n
instead ofroute
since we don't know whatlocalnet
is. But it looks like the problem may be your nameserver. Tryping 8.8.8.8
and if that works, tryhost google.com 8.8.8.8
. – depquid Apr 3 at 18:14grep '^hosts' /etc/nsswitch.conf
? – Patrick Apr 3 at 18:22ping 8.8.8.8
andhost google.com 8.8.8.8
. it shows googles IP and mail servers. – Subhransu Apr 4 at 14:29hosts: files dns
entry in it. – Subhransu Apr 4 at 14:34198.154.126.1
from for the nameserver? – depquid Apr 4 at 15:03