I have been racking my brain trying to figure out why the setup I have works on some LXCs and not on others. The most mind numbing part is the fact that they work in the beginning but somewhere in the process of updates they break.
I have two network faces one for internal network access only and one for WAN access only.
So I have static IPs set because if I do DHCP the LXC only wants to try and access the WAN via the internal network. If I set a static IP for the internal network with no default gateway and the WAN network with the default gateway I can ping out to google.com. On the inside network I cannot access the LXC by any means e.g. webpage or ssh.
When static both interfaces with an IP and a default gateway then I can no longer ping out to google.com but now I can access the LXC internally either by ssh or its webpage.
I have a few other LXCs setup like this where the interfaces have static IPs that have no default gateway set on the internal network interface and a default gateway set on the WAN interface. Everything works fine as I can access the WAN and LAN sides as they should be.
The two differences are
1. On the working LXCs the WAN and LAN interface are both 10gb but on the ones that are not working the LAN is 10gb and the WAN is 1gb.
2. On the working LXCs the WAN gateway IP is the router. On the ones not working the default gateway IP is another device that sends all the traffic through a VPN.
I have two network faces one for internal network access only and one for WAN access only.
So I have static IPs set because if I do DHCP the LXC only wants to try and access the WAN via the internal network. If I set a static IP for the internal network with no default gateway and the WAN network with the default gateway I can ping out to google.com. On the inside network I cannot access the LXC by any means e.g. webpage or ssh.
When static both interfaces with an IP and a default gateway then I can no longer ping out to google.com but now I can access the LXC internally either by ssh or its webpage.
I have a few other LXCs setup like this where the interfaces have static IPs that have no default gateway set on the internal network interface and a default gateway set on the WAN interface. Everything works fine as I can access the WAN and LAN sides as they should be.
The two differences are
1. On the working LXCs the WAN and LAN interface are both 10gb but on the ones that are not working the LAN is 10gb and the WAN is 1gb.
2. On the working LXCs the WAN gateway IP is the router. On the ones not working the default gateway IP is another device that sends all the traffic through a VPN.