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

How to remove old IP entry of host [solved]

Scheduled Pinned Locked Moved DHCP and DNS
dns resolutiondns resolver
3 Posts 2 Posters 995 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.
  • K
    Kalle13
    last edited by stephenw10 Dec 14, 2021, 4:00 PM Dec 14, 2021, 2:13 PM

    Hi,

    I have a mailserver. It has an entry in the DNS Resolver "mailserver" and the corresponding IP address 192.168.6.2. But in earlier times it had the IP 192.168.2.2 and this address is some where stored in the system. This is not desirable for me, because when I ping the host via

    ping mailserver
    

    the pfsense uses the old IP 192.168.2.2.

    So to find something out I did a short

    grep -rnw "192.168.2.2" /
    

    and found

    /var/unbound/host_entries.conf:12:local-data-ptr: "192.168.2.2 mailserver.localdomain"
    /var/unbound/host_entries.conf:13:local-data: "mailserver.localdomain. A 192.168.2.2"
    

    I also found out that in the /etc/hosts also contains the old address

    192.168.2.2	mailserver.localdomain mailserver
    

    But when I delete the entries in both files, after restarting the DNS Resolvers they are back as nothing happened.
    How can I get rid of these entries?

    Best regards

    "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

    • Kinderzimmer Productions
    G 1 Reply Last reply Dec 14, 2021, 2:26 PM Reply Quote 0
    • G
      Gertjan @Kalle13
      last edited by Dec 14, 2021, 2:26 PM

      @kalle13 said in How to remove old IP entry of host:

      But when I delete the entries in both files, after restarting the DNS Resolvers they are back as nothing happened.

      The '/etc/hosts' file is created and re generated by the pfSense GUI. This happens, among others, when the resolver is restarted.
      The pfSense GUI knows only about "192.168.2.2 = mailserver" because you told it ;)

      Look here Services > DNS Resolver > General Settings at the bottom of the page.
      Check also Services > DHCP Server > (any LAN) at the bottom of the page : "DHCP Static Mappings for this Interface"

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      K 1 Reply Last reply Dec 14, 2021, 3:44 PM Reply Quote 1
      • K
        Kalle13 @Gertjan
        last edited by Kalle13 Dec 14, 2021, 3:46 PM Dec 14, 2021, 3:44 PM

        @gertjan said in How to remove old IP entry of host:

        Look here Services > DNS Resolver > General Settings at the bottom of the page.
        Check also Services > DHCP Server > (any LAN) at the bottom of the page : "DHCP Static Mappings for this Interface"

        Thanks for the hint with the DCHP server. I totally forgot about it. I looked in both and found that there is a static DHCP lease in the DCHP server list. But it is shown no where else in the DCHP server and so I couldn't delete it. Then I remembered that this old IP is the an IP of the range of an old now disabled interface. Luckily I only disabled the interface and not deleted it. So I enabled it which created a tab in the DCHP Server menu with this interface and the static mapping of the old IP. I removed it, disabled the interface again and now I am happy!

        Solved!

        "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

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