• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

[SOLVED] Use dnsmasq to resolve hostnames on my lan

Scheduled Pinned Locked Moved DHCP and DNS
5 Posts 2 Posters 1.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    simon_lefisch
    last edited by simon_lefisch Jan 20, 2020, 9:34 PM Jan 16, 2020, 11:12 PM

    Hello everyone,

    I am very much a beginner with pfSense so I apologize if this has been answered already as I tried looking for a solution but could not find exactly what I am looking for. If there is already a solution, please post a link to it and I will gladly look at it.

    So A little bit about my setup:

    I have a CentOS 7 box running the latest version with KVM and Open vSwitch. VMs are listed as

    pfSense-vm (running as firewall/DHCP server, LAN=192.168.1.250 / WAN=public IP)

    dns-vm (Debian 9 running dnsmasq, 192.168.1.60)

    fileserver-vm (CentOS 7 running Samba/NFS, 192.168.1.30)

    plexserver-vm (Debian 9 running Plex, 192.168.1.31)

    windows10-vm (DHCP from pfSense-vm)

    debian10-vm (DHCP from pfSense-vm)

    I have other devices on my LAN that get their IP's via DHCP (Apple TV/printers/etc). I am trying to setup the dns-vm machine to handle all name resolutions for the devices on my LAN so I can ping/RDP to my machines via hostname instead of using their IP addresses (mainly for the DHCP'd clients), as well as send any non-local requests to the internet (hotmail.com / etc). I have turned off the DNS services on pfSense (DNS Forwarder/Resolver) and set the dns-vm as the primary DNS server (System > General Setup). In the dnsmasq.conf file of the VM, I configured it to forward external requests to 8.8.8.8 and can connect to the internet fine. The issue I am having is that I cannot resolve hostnames to IPs of my machines. I am pretty sure the issue is more with dnsmasq, however I wanted to see if anyone else might have an idea or suggestions I can try. If there is any info you may need me to post, please let me know and I will gladly provide it. Thanks in advance for any help offered.

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Jan 17, 2020, 1:10 AM

      @simon_lefisch said in Use dnsmasq to resolve hostnames on my lan:

      DNS services on pfSense (DNS Forwarder/Resolver)

      Which one - those are 2 different systems.. forwarder is dnsmasq, while resolver is unbound (which could also be set to forward vs resolve)

      Out of the box is default resolver (unbound).

      To resolve local names doesn't matter which one you use. You can either register dhcp clients, or you could setup host overrides for all you devices. Or you could setup dhcp reservations so clients always get the same IP and register reservations.

      But you can do host overrides in either dnsmasq or unbound (you can only use 1 at a time).. So you could resolver host.domain.tld to their local IPs..

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      S 1 Reply Last reply Jan 17, 2020, 4:03 PM Reply Quote 0
      • S
        simon_lefisch @johnpoz
        last edited by Jan 17, 2020, 4:03 PM

        @johnpoz thanks for the reply. After poking around and reading up a bit more on the DNS services, I was able to get hostname resolution with the DNS Resolver service on pfSense. However at some point I think I would like to use my DNS VM as the main DNS server for my LAN. Do you have any suggestions about that?

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Jan 17, 2020, 4:39 PM

          Sure you can do that - if the that dns will have your local records, and you want pfsense to be able to resolve them for say the firewall logs.. Just setup a domain override pointing to your NS for whatever domain your hosts are in.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 2
          • S
            simon_lefisch
            last edited by Jan 20, 2020, 9:33 PM

            Thanks for your input @johnpoz. I will look into that later.

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received