I have a LXC machine configured with bridging so that it has its own public IP address and is accessible over the internet. Even though it's working, the netmask address set in the VMs /etc/network/interfaces is not being kept.
The interface eth0 on the VM is set to an inet static configuration. The address and gateway fields are correct but the netmask is 255.0.0.0, whereas it should be 255.255.255.0.
Setting the inet to manual and letting LXC do the network configuration by specifying the lxc.network.ipv4 and lxc.network.gateway parameters in the host's /var/lib/lxc/my-vm/config results in the same problem.
Should I fix this by specifying the gateway and netmask with a post-up route, or is there a better way?