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

    Solved - Multi homed host question

    Scheduled Pinned Locked Moved DHCP and DNS
    3 Posts 1 Posters 274 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.
    • NogBadTheBadN
      NogBadTheBad
      last edited by NogBadTheBad

      Is there any way to get DNS resolver to return the nearest host to the subnet the lookup is done from.

      I’ve got a subnet 172.16.2.x/24 where my Apple iDevices sit and an IOT lan where my Apple TV’s sit, I’ve got a NAS that’s multi homed on both subnet, the IOT subnet nas interface has a firewall rule on the nas to only allow SMB from the Apple TV’s.

      I’ve tried the following custom options, but lookups still return 172.16.2.10 then 172.15.4.10 regardless of the subnet the lookup is done from:-

      local-data: "nas.xyz.net A 172.16.2.10"
      local-data: "nas.xyz.net A 172.16.4.10"

      I’m using an app on my iDevices and Apple TV’s called infuse and it syncs share data info iCloud.

      Andy

      1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

      1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by

        I’ll have a play with this:-

        https://medium.com/nlnetlabs/client-based-filtering-in-unbound-d7da3f1ef639

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • NogBadTheBadN
          NogBadTheBad
          last edited by NogBadTheBad

          Code in Resolver Custom options:-

          define-tag: "NAS-IOT"
          
          access-control-view: 172.16.4.0/24 NAS-IOT
          access-control-view: XXXX:YYYY:ZZZZ:4::/64 NAS-IOT
          
          view:
          name: "NAS-IOT"
          local-zone: "xyz.net" inform
          local-data: "nas.xyz.net A 172.16.4.10"
          local-data: "nas.xyz.net AAAA XXXX:YYYY:ZZZZ:4::a"
          view-first: yes
          

          From 172.16.2.0/24 & XXXX:YYYY:ZZZZ:2::/64:-

          andyk@mac-pro ~ % host nas
          nas.xyz.net has address 172.16.2.10
          nas.xyz.net has IPv6 address XXXX:YYYY:ZZZZ:2::a
          andyk@mac-pro ~ % host loghost
          loghost.xyz.net has address 172.16.2.10
          loghost.xyz.net has IPv6 address XXXX:YYYY:ZZZZ:2::a
          andyk@mac-pro ~ %
          

          From 172.16.4.0/24 & XXXX:YYYY:ZZZZ:4::/64:-

          pi@homebridge:~ $ host nas
          nas.xyz.net has address 172.16.4.10
          nas.xyz.net has IPv6 address XXXX:YYYY:ZZZZ:4::a
          pi@homebridge:~ $ host loghost
          loghost.xyz.net has address 172.16.2.10
          loghost.xyz.net has IPv6 address XXXX:YYYY:ZZZZ:2::a
          pi@homebridge:~ $ 
          

          Andy

          1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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