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

    How to remove old IP entry of host [solved]

    DHCP and DNS
    dns resolution dns resolver
    2
    3
    971
    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.
    • Kalle13K
      Kalle13
      last edited by stephenw10

      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
      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @Kalle13
        last edited by

        @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 ??

        Kalle13K 1 Reply Last reply Reply Quote 1
        • Kalle13K
          Kalle13 @Gertjan
          last edited by Kalle13

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