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

    LAN rewrite hostname/subdomain to hostname/subdomain.example.com

    DHCP and DNS
    dns resolver
    2
    2
    425
    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
      thisisbenwoo
      last edited by

      Hi all,

      I'm sure there is a simple solution to my question, but I don't really know where to look.

      All I want to do is if I am on my LAN (or VPN), when I type https://hostname,/ I want it to translate it to hostname.example.com for ALL hostnames not defined in the Host Override section of DNS Resolver.

      Current General DNS Resolver Options
      Enable DNS resolver = yes
      Listen Port = default (53)
      Enable SSL/TLS Server = no
      SSL/TLS Certificate = Let's Encrypt cert
      SSL/TLS Listen Port = 853
      Network Interfaces = All
      Outgoing Network Interfaces = All
      System Domain Local Zone Type = Transparent
      DNSSEC = no
      Python Module = no
      DNS Query Forwarding = Yes,
      - Use SSL/TLS for outgoing DNS = yes
      DHCP Registration = no
      Static DHCP = yes
      OpenVPN Clients = yes
      Custom options =
      "server:
      private-domain: "plex.direct"

      Host Overrides =
      Several entries that look something like:
      Host = a
      Parent domain of host = example.com
      IP to return = 192.168.1.x

      Some Host Overrides include alias(es)
      
      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @thisisbenwoo
        last edited by

        That is on the client side, simple search suffix for example.com

        Now when your host does query for hosta it will really do query for hosta.example.com

        example..

        My host.

        indows IP Configuration                          
                                                         
          Host Name . . . . . . . . . . . . : I5-Win     
          Primary Dns Suffix  . . . . . . . : local.lan  
          Node Type . . . . . . . . . . . . : Broadcast  
          IP Routing Enabled. . . . . . . . : No         
          WINS Proxy Enabled. . . . . . . . : No         
          DNS Suffix Search List. . . . . . : local.lan  
        

        See the search suffix - now when it pings it for say some host it auto does query for the fqdn including the domain

        $ ping brother
        
        Pinging brother.local.lan [192.168.2.50] with 32 bytes of data:
        Reply from 192.168.2.50: bytes=32 time=1ms TTL=254
        Reply from 192.168.2.50: bytes=32 time=1ms TTL=254
        

        You can see my client did a query for the fully qualified name

        dns.png

        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 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.