Adding domain to resolve.conf search

how can I add another domain to the search list in resolv.conf

[edit] fixed formatting problem

This is not possible. /etc/resolv.conf will be modified at boot time.

What do you want to achieve? Did you have a look at DNS forwarding?

What I want to achieve is using unqualified domain names for both the local LAN and a LAN on the other side of a VPN. Yes, I do use DNS forwarding but it’s not sufficient without a search list.

I am abundantly aware that using unqualified names is a great source for problems but I am dealing with the community of research scientists who are brilliant people, do amazing things but do not want type fully qualified domain names and only use the shorthand name.

How would it help you adding this to resolv.conf?

I’m not sure I’m interpreting your question correctly but DNS forwarding implies the ability to create a resolv.conf search list. If you added domain that can be forwarded, you may want to make that domain part of the search sequence for unqualified domain names.

Like I said, unqualified domain names have the potential of having ambiguous resolution and that can cause problems but for many people in the user community they may not care. Whether they are browsing with Windows file Explorer, using SSH or using the browser to access the local resource like JIRA or confluence, sometimes they just want to use a short name.

If I was going to implement this, I would use the DNS forwarder interface, add a checkbox indicating the domain should be merged into the DNS search list in addition to the domain name used in DHCP. I don’t know how to specify the order easily unless you can reorder the DNS forwarder list and assume that the local domain specified by your DHCP interface is always first.

I would take a stab at it except it is been over a decade since I used perl last.

I agree with the checkbox. The order would indeed a problem and make the DNS forwarders page more complicated that it needs to.

The list could potentially be somewhere else.

The other option would be to put in the DHCP management page. A one line text box that is copied directly into resolve.conf (after sanitizing the text data)

Yes, if the proxy is being used, it has to be in IPFire’s /etc/resolv.conf, but it can be (and probably should be) pushed to the clients using DHCP, too.

I’m going to reserve judgment on whether or not we should push out the search list to DHCP clients. On the surface it seems like a good idea but something about it feels not quite right.