Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
[SOLVED] Cannot delete firewall alias used by "phantom" rule
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Cannot delete firewall alias used by "phantom" rule (Read 2879 times)
Greelan
Hero Member
Posts: 1028
Karma: 72
[SOLVED] Cannot delete firewall alias used by "phantom" rule
«
on:
June 06, 2021, 10:06:57 am »
I have an interesting little issue. I am trying to delete an Alias that I don't need anymore. However, OPNsense is telling me it can't be deleted because it is used by a firewall rule - but that firewall rule no longer exists.
Is there a manual way I can delete the Alias?
Thanks.
«
Last Edit: June 06, 2021, 12:21:44 pm by Greelan
»
Logged
JasMan
Full Member
Posts: 175
Karma: 9
Re: Cannot delete firewall alias used by "phantom" rule
«
Reply #1 on:
June 06, 2021, 11:54:29 am »
I would try to export the configuration in clear text, remove the alias from the XML and import the modified file again.
I would also recommend to search for the alias in the rule section of the exported configuration. Maybe the rule is still there.
Logged
Duck, Duck, Duck, Duck, Duck, Duck, Duck, Duck, Goose
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: Cannot delete firewall alias used by "phantom" rule
«
Reply #2 on:
June 06, 2021, 11:59:48 am »
Thanks for the suggestion. Is it possible to edit /conf/config.xml in situ and reload it?
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: Cannot delete firewall alias used by "phantom" rule
«
Reply #3 on:
June 06, 2021, 12:17:19 pm »
Solved it. Looking in config.xml, I figured out that it was included in a rule that had been configured on a previous FW group. The group has been deleted but the rules were preserved in the config (seems a bug to me). So in the GUI I simply recreated the group, deleted the rules, then deleted the group again. Probably could have also edited config.xml
«
Last Edit: June 06, 2021, 12:22:56 pm by Greelan
»
Logged
JasMan
Full Member
Posts: 175
Karma: 9
Re: Cannot delete firewall alias used by "phantom" rule
«
Reply #4 on:
June 06, 2021, 12:31:03 pm »
Quote from: Greelan on June 06, 2021, 11:59:48 am
Thanks for the suggestion. Is it possible to edit /conf/config.xml in situ and reload it?
I did it several times to change the IP subnet for all components (interface, aliases, DHCP reservations....) to get a configuration file, which I can import into my OPNsense VM test environment whitout having any IP conflicts in my network. Not sure if it's really supported, but I think as long as you just edit some values and keep the structure of the file, it should be fine.
Logged
Duck, Duck, Duck, Duck, Duck, Duck, Duck, Duck, Goose
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
[SOLVED] Cannot delete firewall alias used by "phantom" rule