LXC no routing to internet when using static ip.

SpaceCowBoy

Member
Feb 13, 2016
51
0
11
38
Hello. I have a new install of Proxmox and a new LXC container (Ubuntu 18.04). I have updates the host however with apt.
If I configure the container to use DHCP I can access the internet and my home network from inside the LXC container.
If I configure the container for static ip then I can't access the internet anymore.
Host has internet access all the time.
Doesn't seem to be a DNS issue more of a routing issue as even pinging googles ip will return a failure.

Examples
PING google.com (216.58.193.142) 56(84) bytes of data.

From ffffff.local (10.0.1.7) icmp_seq=1 Destination Host Unreachable

From ffffff.local (10.0.1.7) icmp_seq=2 Destination Host Unreachable

From ffffff.local (10.0.1.7) icmp_seq=3 Destination Host Unreachable

root@ffffff:~# ping 216.58.193.142

PING 216.58.193.142 (216.58.193.142) 56(84) bytes of data.

From 10.0.1.7 icmp_seq=1 Destination Host Unreachable

From 10.0.1.7 icmp_seq=2 Destination Host Unreachable

From 10.0.1.7 icmp_seq=3 Destination Host Unreachable

Screen Shot 2019-10-15 at 1.29.50 PM.png
 
you set 255.255.255.0 as gateway which is your netmask and not the gateway -> set your gateway correctly
 
you set 255.255.255.0 as gateway which is your netmask and not the gateway -> set your gateway correctly

Oh yeah, good catch. If he changes that then all should be good. I should have seen that too.