LXD public facing ip access to private ip help


(Najib Nour) #1

Hello, i am seeking some help with my lxd container configurations. I am looking to have about 5 containers on the default private network that lxd creates and 1 container facing public ip with mac vlan but still having access to the default private containers. Is there anyway that would be possible to do?

i am trying to made a vpn client that is accessible from devices on the network and then delegate different logins to separate networks on the private side of lxd

Thanks

i previously posted this on the git hub page and received this response

“stgraber
In any case, I suspect the easiest way to do what you want here is to simply put two network interfaces on your container, one normally connected to your LXD bridge and the other a macvlan device attached to your public facing interface.”

i did wanna continue this conversation as to how i would be able to create a profile to allow me to do that, i have tried to use this profile

config: {}
description: “”
devices:
eth1:
name: eth1
nictype: bridged
parent: lxdbr0
type: nic
eth0:
name: eth0
nictype: macvlan
parent: eno1
type: nic
root:
path: /
pool: default
type: disk
name: dualnic
used_by: []

after adding that profile to a fresh new container i still only got a ip address from the private side and nothing from the macvlan side. i suppose im doing this wrong and would need a little guidance

Thanks.


(Benoît) #2

Hi,
Can you confirm eno1 is the network card with you public facing network ?
Did you try to manually add your Public IP to that interface inside the container ?

You also need to know if the network you are connected to is able to support this configuration regarding MAC address different on the same network card . Where are you trying this setup ?

What shows
ip route show default 0.0.0.0/0


(Najib Nour) #3

solution was found please follow this link


(Benoît) #4

Perfect :slight_smile:
I don’t know how this can be flag as RESOLVED