CLI commands
-
I have few questions on pfsense 2.4.5
- how to run setup wizard on console.
- I want to change http/https gui from console
maybe using viconfig on webgui part
is that possible?
I tried to change from https to http in webgui viconfig, but after restart GUI not working - how to apply viconfig changes without reboot
I read somewhere by "rm /tmp/config.cache", but can't found that file.
what I found is /tmp/cache.lock
tq
-
All those are available from the consolemenu
-
- Logout (SSH only) 9) pfTop
- Assign Interfaces 10) Filter Logs
- Set interface(s) IP address 11) Restart webConfigurator
- Reset webConfigurator password 12) PHP shell + pfSense tools
- Reset to factory defaults 13) Update from console
- Reboot system 14) Disable Secure Shell (sshd)
- Halt system 15) Restore recent configuration
- Ping host 16) Restart PHP-FPM
- Shell
Enter an option:
which menu should I choose if I want to chnage GUI from http to https
I don't think I should choose #4, because it will reset all my config -
option 2
also: why wouldn't you just change it in the webgui? (system->advanced->admin access)
-
@heper
Option2 will change https to http but not vice versa
Be careful. Most of the time after using Option2, GUI won't work anymore although you can ping the ip
I need to reset to factory default then "pfctl -d", in order to make it workIt seems only GUI will give consistent result
I prefer CLI if possible -
Hello!
Option 12 could also be a possibility.
I am no expert, and hopefully someone will correct me, so dont rely on this...:)Once you are at the developer shell :
parse_config(true); $config['system']['webgui']['protocol'] = "https"; write_config(); system_reboot_sync(); exec
Check the developer shell help for more info.
John
-
@serbus
what command in php shell to reboot webconfigurator because I don't want to reboot systemAfter testing various methods.
Only viconfig and php shell work perfectlyGOAL: Change Web GUI from http to https
OPTION1
open http://ipaddress
go to System/Advanced/Admin Access
STATUS OKOPTION2
open gui console
8) Shellviconfig
change webgui part from http to https
/etc/rc.restart_webgui
STATUS OK
OPTION3
open gui console
12) PHP shell + pfSense tools
parse_config(true);
$config['system']['webgui']['protocol'] = "https";
write_config();
exec
exit
open gui console
11) Restart webConfigurator
STATUS OKGOAL: Change Web GUI from https to http
OPTION1
open http://ipaddress
go to System/Advanced/Admin Access
go to gui console
11) Restart webConfigurator
STATUS
GUI appeared, type username/password but can't login
Shell shown "php-fpm[341]: /index.php: Successful login for user 'admin' from: 10.0.1.1"OPTION2
open gui console
8) Shellviconfig
change webgui part from https to http
/etc/rc.restart_webgui
STATUS OK
OPTION3
open gui console
12) PHP shell + pfSense tools
parse_config(true);
$config['system']['webgui']['protocol'] = "http";
write_config();
exec
exit
open gui console
11) Restart webConfigurator
STATUS OK