Support for Custom Nameserver

Bug #2065207 reported by Terry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anbox Cloud
New
Wishlist
Unassigned

Bug Description

Is there a supported way to provide a custom nameserver for containers to use rather than the bridge network gateway?

Based on some reading it would appear typically the option raw.dnsmasq: dhcp-option=6,X.X.X.X could be used for example for containers in an lxc bridge network to obtain a custom DNS server via DHCP. This only partially works because it appears DHCP is not used and instead IP information is placed into the file /var/lib/anbox/network.yaml and the anbox-network service facilitates setting the IP at container start.

Once a container is started you can execute dhclient which will force the dhcp process and resolvconf to update /etc/resolv.conf however I would like for all containers to use a custom nameserver separate from the host without manual intervention.

Revision history for this message
Alexis Janon (ajanon) wrote :

Hi!

Sorry for the delay, we're still looking into this internally and will come back to you as soon as possible.

Thanks!

Revision history for this message
Simon Fels (morphis) wrote :

Hey Terry,

you can currently not customize the DNS server Anbox will configure for Android. By default it will make use of the DNS server which LXD puts in place via dnsmasq on the amsbr0 network bridge. If you look into your process list, you will find the following:

  99449 pts/1 S<l+ 0:00 /usr/bin/anbox session --user=anbox --group=anbox --platform=webrtc --metrics-server=influxdb:192.168.100.1:8095,raw --extra-properties=/run/user/1000/anbox/extra.prop --container-cpus=4 --container-memory=8589934592 --network-dns=192.168.100.1

192.168.100.1 is the address dnsmasq on the host listens on and serves DNS requests. dnsmasq will then use the DNS servers configured for the host system to serve any requests it cannot already resolve based on LXD instance names.

We can allow changing the DNS server in the future and add explicit support for that into AMS / Anbox.

Changed in anbox-cloud:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.