OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: bebef on November 19, 2018, 08:22:16 am

Title: Primary interface / DNS name on Dnsmasq - how to change?
Post by: bebef on November 19, 2018, 08:22:16 am
Hi everyone!

I have configured dnsmasq as DNS forwarder. When resolving the main name of the OPNsense box, dnsmasq seems to return the IP of the interface that is the lowest in the alphabet (and thus the first interface in the list of firewall rules).

I need to configure OPNsense's dnsmasq to respond with the IP address of a different interface instead. How can I achieve this? Entering a record in the dnsmasq configuration will cause it to reply with two A records, the correct and the wrong one.

Thanks
Title: Re: Primary interface / DNS name on Dnsmasq - how to change?
Post by: bebef on November 19, 2018, 06:13:33 pm
Going Igrid:

Dnsmasq will use /etc/hosts to resolve, too. This is where my "wrong" IP was from.
To work around this just add no-hosts in "Services: Dnsmasq DNS: Settings". After that you can add a new, better record :D