Default pfSense hostname is external IP?



  • Hi,
    I have a pfSense firewall my school, with multi WANs, multi LANs.

    WAN_1: DHCP
    WAN_2: static IP (11.22.33.44 - my ISP static IP)
    –--------------
    LAN_1: static IP (192.168.0.1)
    LAN_2: static IP (192.168.1.1)

    In General Setup hostname is "pfsense", domain is "local.lan".
    I use DNS resolver (this is default).

    The pfSense automatically generated this file "/var/unbound/host_entries.conf":

    
    local-zone: "local.lan." transparent
    ...
    local-data-ptr: "11.22.33.44 pfsense.local.lan"   # THIS IS MY EXTERNAL IP
    local-data: "pfsense.local.lan. A 11.22.33.44"    #
    
    

    The ARP table also shows:

    
    WAN_2  11.22.33.44   pfsense.local.lan
    LAN_1    192.168.0.1
    
    

    How can I set the system hostname is my LAN ip?
    The DNS resolver "Host overrides" makes a plus entry, this is not a solution.

    Thanks!



  • Thanks, my problem was solved.



  • @xense:

    Thanks, my problem was solved.

    What was the solution?



  • Sorry,

    I did not find the setting for this in pfSense. I think pfSense when installing, the pfSense the second interfaces address put the/etc/hosts fileautomatically. (My second interface is WAN_2). The unbound (DNS Resolver) read datas from this file and write this information into the```
    /etc/unbound/host_entries.conf

    
    I checked the DNS Resolver -> Advanced Settings -> Disable Auto-added Host Entries, and the host_entries.conf file does not contain this information now. I have manually entered these the DNS Resolver -> Custom options:
    

    server:
    local-zone: "local.lan." transparent
    ...
    local-data-ptr: "192.168.0.1 pfsense.local.lan"  #  CHANGED IP MY LAN_1 ADDRESS
    local-data: "pfsense.local.lan. 192.168.0.1"      #

    
    In the ARP table is show now:
    

    interface    IP address      Hostname
    WAN_2      11.22.33.44    router.example.com    # extarnal ip, my external domain
    LAN_1      192.168.0.1    pfsense.lan.home      # internal ip, domain

    
    This working  ;)

Log in to reply