After setting a linode with the private ip, it fails to ping other websites

To use the balancer, I try to setup the private ip for our linode instance based on the doc: https://www.linode.com/docs/networking/ … iguration/">https://www.linode.com/docs/networking/linux-static-ip-configuration/

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

That error indicates a DNS failure. Did you get the values you used for dns-nameservers from the Remote Access tab in the Linode manager?

You can try pinging an IP address (e.g., 8.35.80.24) to eliminate DNS as a factor in your testing.

Which part in "Remote Access" means the "dns-nameservers" ?

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.

Yes, you are correct, the DNS Resolvers lists the addresses of the nameservers you should use.

To try a DNS query, you can run dig www.google.com - if you get "connection timed out; no servers could be reached" then look in /etc/resolv.conf. If you don't see something like the following in there, then somehow the nameservers aren't being correctly configured:

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

If you're just trying to set up the server to use private IP addresses, you can use our network helper. It will automatically detect every IPv4 address assigned to your server, then make a configuration for it. You can activate network helper with this set of instructions:

https://www.linode.com/docs/platform/ne … n-profiles">https://www.linode.com/docs/platform/network-helper#turn-network-helper-on-for-individual-configuration-profiles

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!

I am having this exact same issue with two Ubuntu linodes I am load balancing with the nodebalancer. I manually set the static IP addresses just as the nodebalancer instructions state here (https://www.linode.com/docs/platform/no … ence-guide">https://www.linode.com/docs/platform/nodebalancer/nodebalancer-reference-guide) and then the nodebalancer works perfectly but suddenly I can't ping any outside IP addresses or even my own default gateway. Is this something to do with using nodebalancers?

This wouldn't be an issue with the nodebalancers, it sounds like there might be an issue in the configuration of the server, though. You can either try to use the network helper or you can ensure you have made an entry for your public IP as well as the private.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct