Hi I am currently using post routing and pre routing rules to bind traffic in and out from specific public ip’s to individual lxc containers
Is there a better way to do this?
Or how can I disable lxc from creating the post routing rule “generated for LXD network lxdbr0”
As a quick fix I have been running this command
sudo iptables -t nat -D POSTROUTING $(sudo iptables -t nat -L -n -v --line-numbers | grep “generated for LXD network lxdbr0” | awk ‘{print $1}’)
There is no bindings. You wont see the containers public ips on the LXD hosts network interface, nor will you see any Nat rules for your containers.
The network interface inside your container will have your actual public ip, and your LXD host will advertise that to the wider external network using proxy ARP, so that your LXD host will behave as a layer 3 router.