OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 15.1 Legacy Series »
  • DNS Forwarder not working
« previous next »
  • Print
Pages: [1]

Author Topic: DNS Forwarder not working  (Read 26540 times)

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
DNS Forwarder not working
« on: June 19, 2015, 05:51:24 pm »
Hi,
i have problems getting the dnsmasq running.
Installed 15.1.11 upgraded to 15.1.12
Multiwan setup
dhcp server running
system->settings dns servers entered and assigned to the 2 wans
dns forwarder enabled, no other checkbox enabled on this page
diagnostics->dns lookup works
dhcp works and distributes the ip number of the opnsense box as a nameserver to all clients
i can ping from any host ip numbers but i can't resolve any domain name

Any help is very welcome,
Best regards,
Paul

/etc/resolv.conf
domain foo.local
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 194.25.0.52
nameserver 194.25.0.68

/etc/hosts
127.0.0.1       localhost localhost.foo.local
10.190.30.254   foorouter.foo.local foorouter
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13936
  • Karma: 1208
    • View Profile
Re: DNS Forwarder not working
« Reply #1 on: June 19, 2015, 05:56:20 pm »
dnsmasq version was bumped in the last update, can you try the following to see if the new version behaves differently. Run this from the root shell:

(Assuming you use OpenSSL/amd64, if not, the URL must be adapted)

# fetch https://pkg.opnsense.org/FreeBSD:10:amd64/15.1.11.4/OpenSSL/All/dnsmasq-2.72_1,1.txz
# pkg add -f dnsmasq-2.72_1,1.txz

Restart the service from the GUI or better yet try a reboot.

It would also be helpful to see a screenshot of any dnsmasq-related error messages in the system logs pages.

Thanks,
Franco
« Last Edit: June 19, 2015, 06:23:34 pm by franco »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13936
  • Karma: 1208
    • View Profile
Re: DNS Forwarder not working
« Reply #2 on: June 19, 2015, 06:00:17 pm »
BTW, to get back to the latest version, type:

# pkg install -yf dnsmasq
Logged

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: DNS Forwarder not working
« Reply #3 on: June 19, 2015, 06:17:23 pm »
Hi Franco,
no errors in the log.
Logged

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: DNS Forwarder not working
« Reply #4 on: June 19, 2015, 06:21:00 pm »
Quote from: franco on June 19, 2015, 06:00:17 pm
BTW, to get back to the latest version, type:

# pkg install -yf dnsmasq

Did you mean:
# pkg install -Af dnsmasq

root@OPNsense:~ # pkg add -yf dnsmasq-2.72_1,1.txz
pkg: illegal option -- y
Usage: pkg add [-IAfqM] <pkg-name> ...
       pkg add [-IAfqM] <protocol>://<path>/<pkg-name> ...

For more information see 'pkg help add'.

Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13936
  • Karma: 1208
    • View Profile
Re: DNS Forwarder not working
« Reply #5 on: June 19, 2015, 06:23:12 pm »
Oh, sorry, no "-y" for pkg-add needed; "-f" is enough.
Logged

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: DNS Forwarder not working
« Reply #6 on: June 19, 2015, 06:24:29 pm »
By the way,
shouldn't there be a /etc/dnsmasq.conf file?

Logged

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: DNS Forwarder not working
« Reply #7 on: June 19, 2015, 06:30:34 pm »
Hi,
tried:
# fetch https://pkg.opnsense.org/FreeBSD:10:amd64/15.1.11.4/OpenSSL/All/dnsmasq-2.72_1,1.txz
# pkg add -f dnsmasq-2.72_1,1.txz

reboot,
same as before.

Logged

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: DNS Forwarder not working
« Reply #8 on: June 19, 2015, 07:43:35 pm »
Hi,
did a clean install with 15.1.12
Same thing.
« Last Edit: June 19, 2015, 07:51:39 pm by pboe »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13936
  • Karma: 1208
    • View Profile
Re: DNS Forwarder not working
« Reply #9 on: June 21, 2015, 07:07:26 pm »
And with the old 15.1.11.1? Sorry to bug you. We can't pin this down for some reason. https://pkg.opnsense.org/releases/15.1.11.1/
Logged

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: DNS Forwarder not working
« Reply #10 on: June 22, 2015, 11:57:33 am »
Hi Franco,
i've done a clean installation of 15.1.11.1.
Configured wan network settings, which is the default gateway, everything works fine.
Then started to configure the multi wan setup by adding a 2nd wan, adding in the routing tab a new group with both interfaces as tier 1 for load balancing.
Still everything works, even the 2nd Wan is not physically connected.
Once i edit the standard firewall rule to use the load balancing gateway group, the dns isn't working any more for the connected clients.

Best regards,
Paul 
Logged

philamonster

  • Newbie
  • *
  • Posts: 15
  • Karma: 5
    • View Profile
Re: DNS Forwarder not working
« Reply #11 on: June 26, 2015, 09:41:54 pm »
Are you sure the resolver is not running? Just had a forwarding issue myself after removing a manual dnsmasq entry for a secondary hostname. Service would not start after I saved and all my host overrides failed. Turns out unbound was running though disabled in gui with an apply button to save changes every time I went to Services > DNS Resolver.

I killed unbound and manually started dnsmasq and the service started. Though the resolver is disabled I am still prompted to save changes in gui under Services > DNS Resolver for whatever reason.
« Last Edit: June 26, 2015, 09:44:45 pm by philamonster »
Logged

philamonster

  • Newbie
  • *
  • Posts: 15
  • Karma: 5
    • View Profile
Re: DNS Forwarder not working
« Reply #12 on: June 27, 2015, 10:01:10 pm »
Ok, after reboot had to start dnsmasq manually again. DNS Resolver not running and not asking to apply changes in gui / disabled. DNS Forwarder is enabled in gui too but just doesn't start. 

EDIT: dnsmasq seems to get SIGTERM when restarting ANY service. Just adding/removing static DHCP lease killed it.

This is when starting service from Status > Services:

Code: [Select]
Jun 27 17:13:35 dnsmasq[19366]: FAILED to start up
Jun 27 17:13:35 dnsmasq[19366]: junk found in command line

Static DHCP mappings also not being written to /etc/hosts.
« Last Edit: June 27, 2015, 11:20:36 pm by philamonster »
Logged

pboe

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: DNS Forwarder not working
« Reply #13 on: June 29, 2015, 01:49:27 pm »
Hi,
switching from the resolver to the forwarder in the gui, stops unbound and starts dnsmasq. so from that side evrything is fine.
Things stop working, when i change the firewall rule to use the multi wan gateway group instead of the default gateway.

 
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 15.1 Legacy Series »
  • DNS Forwarder not working
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2