Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxc-net: Tell dnsmasq that the LXC network is local #2457

Closed
thsnr opened this issue Jul 9, 2018 · 1 comment
Closed

lxc-net: Tell dnsmasq that the LXC network is local #2457

thsnr opened this issue Jul 9, 2018 · 1 comment

Comments

@thsnr
Copy link

thsnr commented Jul 9, 2018

Required information

  • Distribution: Debian
  • Distribution version: buster (testing)
  • The output of
    • lxc-start --version: 2.0.9

Issue description

The dnsmasq started by lxc-net is told that ${LXC_DOMAIN} is a local domain and queries on that domain should not be forwarded upstream. This part works fine, but it would be nice if it would also be told not to forward reverse (IP) lookups on ${LXC_NETWORK}. Otherwise if I forward reverse lookups from the host to the lxc-net dnsmasq and there is no corresponding IP, it forwards the request back to the host resolver. This results in a loop, which drains system resources and makes other lookups extremely slow due to maximum connections being reached.

Currently I have worked around this by adding LXC_DHCP_CONFILE="/etc/lxc/dnsmasq.conf" to /etc/default/lxc and putting rev-server=10.0.3.0/24, in /etc/lxc/dnsmasq.conf.

Steps to reproduce

  1. Start lxc-net with LXC_NETWORK=10.0.3.0/24 (the default).
  2. Configure the host machines resolver to forward 3.0.10.in-addr.arpa requests to 10.0.3.1.
  3. Lookup a non-existent IP, i.e., host 10.0.3.234.
  4. Observe that the lookup hangs and the system log is filled with:

dnsmasq[XXXX]: Maximum number of concurrent DNS queries reached (max: 150)

As far as I can tell and have quickly tested, simply adding --rev-server=${LXC_NETWORK}, (note the trailing comma) to the dnsmasq invocation in start() fixes this.

@brauner
Copy link
Member

brauner commented Jan 7, 2019

Hm, but it seems to me that that's exactly what the confile for dnsmasq is for so I'm not sure we would implement this. :)

@brauner brauner closed this as completed Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants