OPNsense Forum

English Forums => General Discussion => Topic started by: mediahost on June 30, 2021, 02:24:11 PM

Title: Edit Firewall Rules in CLI
Post by: mediahost on June 30, 2021, 02:24:11 PM
Hi,

is it possible to edit a firewall rule from the command line? I am running OPNsense 21.1.7_1 and had an existing firewall rule allowing access to the Web GUI from a specific IP block, I then removed the iP block and made available publicly just temporarily, but now I cannot get back to the GUI. I do have SSH access though and I can see in the firewall log that all requests to my Web GUI port 8443 are being blocked.

I have restarted the router a few times in the hope the rule would flush but it seems my only option is to either restore a config file from backup or edit the rule via command line, but I dont find any instructions on CLI firewall editing.

Any help, much appreciated.
Title: Re: Edit Firewall Rules in CLI
Post by: mediahost on June 30, 2021, 06:49:58 PM
Update and Solved.

I restored an older .xml config backup file remotely by overwriting the config.xml located in the /conf directory.