Perform changes/settings from CLI/Shell?
-
I've recently been unable to use webGUI (because of down Internet connections making the webGUI unresponsive: unavailable LDAP auth server I guess) but SSH shell was working fine.
Is there a proper way to perform via the shell the same actions available to me via the webGUI?
Example:
- Set gateway monitoring IP/delays
- Add/remove gateways from Gateway Groups
- Add/edit/remove firewall rules
-
You can do all that by running the correct commands in the developer shell (option 12 in the console menu):
https://doc.pfsense.org/index.php/Using_the_PHP_pfSense_ShellYou can also edit the config file directly and then force a config reload.
Both those options are open to error! ;)
Steve
-
A viconfig && /etc/rc.reload_all would then be the best solution?
-
Yes, that should work, if you're familiar with vi. (Did you mean vi config?)
ee /conf/config.xml
For the rest of us! ;)
As I said this is very open to some typo that breaks your box.
Steve
-
Actually, it looks like a new alias snuck into the command line.
viconfig
Now automatically opens vi on /cf/conf/config.xml, quite handy.
I don't know exactly which version brought it in, but it's definitely in 2.1.3.
I'm still hunting down exactly where it gets linked in, for now it's an Easter Egg….. ;)Edit: There she be - /usr/local/bin/viconfig (gawd, it's been around since 1.2.X! at least 6 years)
Ah, the things you learn.....
-
-
Yep, did not know that. Thanks. :)
Ready for eeconfig though!
Steve