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

    Resolving one host name to different IP per VLANs

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 2 Posters 652 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.
    • T
      tfuto
      last edited by tfuto

      I use many VLANs. I would like to refer to the pfSense router using pfsense.home.arpa from all VLANs, to ease deployments.

      E.g.

      • VLAN1 uses IPs from 10.0.0.0/24,
      • VLAN2 uses IPs from 10.0.1.0/24,
      • VLAN1 clients should resolve pfsense.home.arpa to 10.0.0.1/32, and
      • VLAN2 clients should resolve pfsense.home.arpa to 10.0.1.1/32.

      There is no inter-VLAN routing allowed (and all VLAN clients connect to a proxy at 10.0.X.1:3128).

      (I cannot create a static lease for the router based on MAC, as VLANs depend on their parent interface's MAC, so the router has the same MAC on all VLANs. Also, I would not like to create a single DNS entry with multiple IPs and resort to round-robin resolution.)

      What would be the best way to achieve this setup? Thank you.

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @tfuto
        last edited by

        @tfuto that would be done with views. You can create views in unbound so clients on vlan 2 would resolve some fqdn to ip X, while clients on vlan 1 would resolve same fqdn to IP Y.

        But you can not do views in the gui, have to be done in the options box.

        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.8, 24.11

        1 Reply Last reply Reply Quote 1
        • T
          tfuto
          last edited by tfuto

          Thank you @johnpoz! It took 10 minutes to actually understand your answer (pro Linux-er but noob FreeBSD-er here LOL), and actually this I can do. Awesome!

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @tfuto
            last edited by johnpoz

            @tfuto well unbound runs on either linux or freebsd, so not sure about your answer ;)

            But ok.. I do believe I have some posts here going over basic simple view setup..

            Here is one back from 2017 when they first updated unbound to support views in pfsense

            https://forum.netgate.com/post/684870

            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.8, 24.11

            T 1 Reply Last reply Reply Quote 1
            • T
              tfuto @johnpoz
              last edited by

              @johnpoz Just I have never yet run into unbound on Linux, that is all. (Maybe I am noob on Linux as well? 😁)

              Thank you for the linked reference! Very useful!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.