Static IP bridge + route single NIC only

Hi I would like to build a system that would allow two versions of software to be running on the same host

I would like to be able to run Ubuntu 14.04 as an LXD container on an Ubuntu 18.04 server. This is to get some legacy websites off a large VM and free the resources.

There would be 2 NICs on the 18.04 server.
The 1st NIC would be to access the Webserver on the 18.04 server and the server itself.
The 2nd NIC would be exclusively for the LXD container. It would have no access to the 18.04 server.
Also having the LXD container have a static IP address is best.

----[NAT IP]----| eth0 |------------------| OS Webserver & VM |

----[NAT IP]----| eth1 |-----|lxdbr0|-----| Other webserver   |

Any ideas how to set this up. I’ve played with iptables and ebtables. Don’t know enough to work this thru properly.

Thanks if anyone knows.

If you want to use eth1 exclusively for one LXD container then using it as a physical interface may be a better choice than using a bridge. Unless you want to configure firewall rules for the container on the host. You won’t be able to do that on physical interface moved to the container. Macvlan should have a similar result I guess.

physical: Straight physical device passthrough from the host. The targeted device will vanish from the host and appear in the container.


Perfect. Physical pass-through.

Thanks mikma