After setting a linode with the private ip, it fails to ping other websites
After setting the private ip, this linode fails to ping other websites, the error message is:
$ ping www.google.com
ping: unknown host www.google.com
OS: Ubuntu 16.04.1 LTS (GNU/Linux 4.8.3-x8664-linode76 x8664)
Here are our settings in /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 139.163.48.206/24
gateway 139.163.48.1
netmask 255.255.128.0
dns-nameservers 139.163.11.5 139.163.13.5 139.163.14.5
dns-search members.linode.com
dns-options rotate
iface eth0 inet static
address 192.168.143.123/17
iface eth0 inet6 auto
Base on the linode "Remote Access" information:
Public Network
Public IPs
139.163.48.206 / 24 ( li1461-205.members.linode.com )
2400:8901::f03d:91fe:fe26:3268 / 64
Default Gateways
139.163.48.1
fe80::1
DNS Resolvers
139.163.11.5
139.163.13.5
139.163.14.5
Private/LAN Network
Private IPs
192.168.143.123 / 17
The linode is already rebooted and the firewall seems correct because when I use the default settings as follows, the ping is working…
auto eth0
iface eth0 inet dhcp
I have some questions about this situation:
1. The settings in /etc/network/interfaces are correct or incorrect?
2. Is it a normal behavior that a linode with a private ip fails to ping other website? or something I just missed?
6 Replies
You can try pinging an IP address (e.g., 8.35.80.24) to eliminate DNS as a factor in your testing.
I suppose that the "DNS Resolvers" is "dns-nameservers" …
BTW, I can ping the IP 8.35.80.24, so it is a DNS problem indeed.
To try a DNS query, you can run dig
nameserver 139.163.11.5
nameserver 139.163.13.5
nameserver 139.163.14.5
If you can't get an answer to your DNS query but /etc/resolv.conf looks OK, it's possible your network routes are messed up. Run ip route get 139.163.11.5 to see how packets are being sent out. It should produce this:
139.163.11.5 via 139.163.48.1 dev eth0 src 139.163.48.206
Please note that it will overwrite your existing network configuration, so if you have something set specifically, you'll need to input it again.
Good luck!
network helpermade an entry