multi icon indicating copy to clipboard operation
multi copied to clipboard

Support for settings nameserver from dhcp?

Open fadenb opened this issue 10 years ago • 5 comments

Hi,

I would love to see multi with the ability to configure nameservers provided dhcp.

I started toying around with multi in combination with mptcp and really like it. The only thing that is missing in order to completely replace my old setup is the ability to set nameservers provided by the dhcp servers.

fadenb avatar Jan 09 '14 12:01 fadenb

Hi,

Good idea, I will try to look into it over weekend. The information should already be there, so the biggest challenge is to ensure that resolv.conf mirrors the interface metrics. DNS requests are sent to the first DNS server on the list, but if there are overlapping networks then the request might not be sent over the correct interface. Some DNS servers block requests from clients not belonging to their network.

One easy solution would be to just have resolv.conf contain the nameservers of the interface with the lowest metric, and then update the entire file as needed.

kristrev avatar Jan 09 '14 13:01 kristrev

Hi Faden,

Sorry for taking so long on this. Work has gotten in the way and I have not been able to look more into adding this feature. I will try to get it ready as soon as possible. Btw, I saw that you had forked multi, are you working on adding support for DNS?

kristrev avatar Jan 30 '14 20:01 kristrev

Hey, no rush :)

I forked it to work on creating a Debian package for multi. But as it goes I did not have time to do some real work myself. I will let you know when it is it packaged.

fadenb avatar Feb 03 '14 16:02 fadenb

Hi,

Instead of changing resolv.conf, it may be better to use either resolvconf(8) or systemd-networkd(8). I can take a stab at a resolvconf-based solution, but I'm not sure how, where, in which state machine it's best to implement up/down...

ybastide avatar Jul 27 '14 19:07 ybastide

Sorry for my very late reply, I have been and still am on holiday :)

My suggestion would be to that when an interface becomes available/unavailable (so in multi_multicast), recreate the entire resolv.conf by iterating through interfaces and adding the DNS addresses acquired through DHCP. You should add public DNS servers (for example Google and OpenDNS) to the end of the file, for interfaces that are not configured through DHCP (or if a DNS server fails).

kristrev avatar Aug 07 '14 09:08 kristrev