External DHCP Not working on my enviroment

networking

(Thiago Bispo Da Silva) #1

Hello,

I am having a problem while trying to make my DHCP server assign ip’s to the VMS created using LXD bridge.

I’m creating a VPN to connect to VMS on the internet with my local network.
The OpenVPN works normally. The tunneling creation between VM (TAP0) and VPN container (TAP0) works fine.

After this tunnel, I’m trying to get an IP address in VM(BR0) but didn’'work.

I’ve analyzed the DHCP package and the percussion it does is the following.

VM (TAP0) -> VM (ETH0) -> VPN_Container (TAP0) -> VPN_Container (ETH0) -> Local_Server (LXDBR).

In this case, it can not pass from the LXCBR bridge to the eth0 interface on the local server.

I’ve already tried port redirection over iptables and used the dhcp-helper to redirect DHCP to no avail.

Could someone help me with this problem?

Thank you very much in advance

LXDBR

config:
   ipv4.address: 10.70.7.1/24
   ipv4.nat: "true"
   ipv6.address: none
description: ""
   name: lxdbr
   type: bridge
used_by:
    - /1.0/containers/vpn_service
managed: true
status: Created
locations:
   - none


(Thiago Bispo Da Silva) #2

Any one?


#3

Hi!

You have some typos that do not help in understanding the issue.

  1. What is VMS? What do the letters stand for?
  2. This is an LXD question, you can tag it as LXD. In one case you mention by mistake lxcbr0, though you probably meant lxdbr0.

Your LXD configuration uses a private bridge, which means that the containers by default will use LXD’s internal dnsmasq DHCP/DNS server.

If you want your containers to use the network’s DHCP/DNS server, you need to either setup a bridge or macvlan. macvlan would be easier, see The LXD tutorials of Simos on how to set either.