Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Gateway cannot be deleted because it is in use by DNS Server

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 2 Posters 605 Views 2 Watching
    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.
    • R Offline
      Ragnaill
      last edited by

      I am a not terribly expert pfsense user, and am also not clear if I am posting this in the appropriate topic area.

      I am in the process of moving from pfsense client OpenVPN tunnels to Wireguard tunnels, as my VPN provider no longer supports OpenVPN. I decommissioned the OpenVPN tunnels and brought up a Wireguard tunnel; specifically, sequentially I deleted the OpenVPN client configuration, deleted the interface assignment, deleted the cert, and then brought up the Wireguard tunnel. I then realized I had forgotten about the OpenVPN gateway configuration. When I tried to delete the OpenVPN gateway, I received the following error message: ‘Gateway “OVPNC1_VPNV4” cannot be deleted because it is in use by DNS Server <DNS server IP address>’.

      I can find nowhere in the configuration where I specified the gateway the DNS server should use, and I’m mystified why it should continue to use a gateway that is no longer associated with any tunnel. Can anyone suggest what I might be missing, and how I would get past this error? Thanks in advance.

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ Offline
        johnpoz LAYER 8 Global Moderator @Ragnaill
        last edited by

        @Ragnaill look here under general setup

        gateway.jpg

        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 26.03.1 | Lab VMs 2.8.1, 26.07

        1 Reply Last reply Reply Quote 0
        • R Offline
          Ragnaill
          last edited by

          Thank you for the response, johnpoz. I'm running 2.8.1-CE, and I don't have that field. I have the Address and Hostname fields, but no gateway field. Hmmm ... perhaps delete the 2 DNS servers I have specified, and then try to delete the gateways?

          R johnpozJ 2 Replies Last reply Reply Quote 0
          • R Offline
            Ragnaill @Ragnaill
            last edited by

            OK, that worked. I deleted 1 DNS server and was then able to delete the (apparently) associated gateway. I added the first DNS server back and then followed the same steps with the second DNS server.

            However, I am now concerned as to why my System -> General Setup -> DNS Server Settings section lacks the Gateway field option. Any insights?

            1 Reply Last reply Reply Quote 0
            • johnpozJ Offline
              johnpoz LAYER 8 Global Moderator @Ragnaill
              last edited by

              @Ragnaill you would have it you have more than 1 gateway.

              Here I fired up my 2.8.1 test vm.. See no gateway in dns, set another gateway and now ability to set gateway on dns shows up.

              gateway281.jpg

              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 26.03.1 | Lab VMs 2.8.1, 26.07

              R 1 Reply Last reply Reply Quote 0
              • R Offline
                Ragnaill @johnpoz
                last edited by

                @johnpoz Aha! Thank you! That makes sense; why would the field be relevant until one has a gateway choice? Thanks very much!

                johnpozJ 1 Reply Last reply Reply Quote 0
                • johnpozJ Offline
                  johnpoz LAYER 8 Global Moderator @Ragnaill
                  last edited by johnpoz

                  @Ragnaill not sure - possible you had a cached page or something?

                  But to duplicate that sort of error, I assigned a gateway and then tried to delete the gateway.. This the error you were getting right?

                  error.jpg

                  I would take it doesn't show up without multiple gateways because there could only be 1 gateway so why offer the choice?

                  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 26.03.1 | Lab VMs 2.8.1, 26.07

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    Ragnaill @johnpoz
                    last edited by

                    @johnpoz Yes, that's the error I got. Your explanations make perfect sense. Thank you very much for taking the time to test this out ... and bail me out!

                    johnpozJ 1 Reply Last reply Reply Quote 0
                    • johnpozJ Offline
                      johnpoz LAYER 8 Global Moderator @Ragnaill
                      last edited by

                      @Ragnaill no problem - glad you got it sorted, and for sure might help the next guy that runs into this sort of thing.. I take it my plus is showing it to me because I do have multiple gateways.

                      Only question is why was your not showing it.. Since clearly if you were trying to delete a gateway you had multiple gateways? You were not trying to delete your only gateway were you?

                      Either way glad you got it sorted.

                      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 26.03.1 | Lab VMs 2.8.1, 26.07

                      R 1 Reply Last reply Reply Quote 0
                      • R Offline
                        Ragnaill @johnpoz
                        last edited by

                        @johnpoz Nope, I still had the WAN interface gateway, but it was the only one left that actually was functioning. The OVPN gateway was still listed under System -> General Setup -> DNS Server Settings, but the associated VPN interface assignment, OpenVPN client, and cert had been deleted. I have to assume that the System -> General Setup -> DNS Server Settings Gateway field no longer displayed because there was only one functioning gateway (WAN) left, even though the OpenVPN gateway was still listed under System -> General Setup -> DNS Server Settings (and not even in the lighter text indicating an inactive gateway). Anyway, thanks very much for your help. I appear to have the occasional talent for stumbling into order dependencies when I delete things. ;-)

                        R 1 Reply Last reply Reply Quote 0
                        • R Offline
                          Ragnaill @Ragnaill
                          last edited by

                          Sorry, misstated previous paragraph. Correction:

                          Nope, I still had the WAN interface gateway, but it was the only one left that actually was functioning. The OVPN gateway was still listed under System -> Routing -> Gateways, but the associated VPN interface assignment, OpenVPN client, and cert had been deleted. I have to assume that the System -> General Setup -> DNS Server Settings Gateway field no longer displayed because there was only one functioning gateway (WAN) left, even though the OpenVPN gateway was still listed under System -> Routing -> Gateways (and not even in the lighter text indicating an inactive gateway). Anyway, thanks very much for your help. I appear to have the occasional talent for stumbling into order dependencies when I delete things. ;-)

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                          Privacy Policy · Cookie Policy