Gateway cannot be deleted because it is in use by DNS Server
-
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.
-
@Ragnaill look here under general setup

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

-
@johnpoz Aha! Thank you! That makes sense; why would the field be relevant until one has a gateway choice? Thanks very much!
-
@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?

I would take it doesn't show up without multiple gateways because there could only be 1 gateway so why offer the choice?
-
@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!
-
@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.
-
@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. ;-)
-
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. ;-)
Privacy Policy · Cookie Policy