I have a server with a single NIC and two IPs. I've set up the primary IP on the actual NIC and i added a virtual NIC that's listening on the second IP. Now, i need to bridge the second IP to a VM. The issue is that i don't want the VM to have access to the primary IP and i don't want on the host to bind to the second IP either. I've tried bridging the virtual NIC but it just breaks all connections, so that won't work. I can't add a second NIC either.

I'm running Ubuntu 19.04 and i've installed ifupdown to replace netplan as i'm more familiar with it.

EDIT: A netplan solution would be nice as i can't get DNS resolution working on ifupdown.

  • 1
    Please edit the question and indicate the type of VM. Some VM sytems (e.g. virtualbox) have an, hm, odd idea how to do networking, but most VM systems offer a configuration option that will add a "virtual NIC" with a "virtual IP" to an existing physical NIC (macvlan-style). If your server itself is not a physical server (Azure, Amazon), there may be additional restrictions; please edit your question in that case. – dirkt May 9 '19 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.