Start service sslh at boottime
-
Hi,
I've installed on my pfSense CE 2.7.2 following opnsense packages for sslh to work:
https://pkg.opnsense.org/FreeBSD:14:amd64/24.7/latest/All/libconfig-1.7.3.pkg
https://pkg.opnsense.org/FreeBSD:14:amd64/24.7/latest/All/libev-4.33_1,1.pkg
https://pkg.opnsense.org/FreeBSD:14:amd64/24.7/latest/All/sslh-2.1.2.pkgNow, I want to start sslh when my pfSense boot.
Where do I have to put the command to start sslh?[2.7.2-RELEASE][admin@hestia.foo.bar]/root: /usr/local/etc/rc.d/sslh start
Cannot 'start' sslh. Set sslh_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'.
[2.7.2-RELEASE][admin@hestia.foo.bar]/root:In /etc/rc.conf I see following message:
[2.7.2-RELEASE][admin@hestia.foo.bar]/root: cat /etc/rc.conf
THIS FILE DOES NOTHING, DO NOT MAKE CONFIG CHANGES HEREI can start sslh with the onestart command:
[2.7.2-RELEASE][admin@hestia.foo.bar]/root: /usr/local/etc/rc.d/sslh onestart
Starting sslh.
[2.7.2-RELEASE][admin@hestia.foo.bar]/root:I can stop sslh with the onestop command:
[2.7.2-RELEASE][admin@hestia.foo.bar]/root: /usr/local/etc/rc.d/sslh onestop
Stopping sslh.
[2.7.2-RELEASE][admin@hestia.foo.bar]/root:In what file I have to put the command so it starts on boot (and stops on reboot/shutdown)?
@dev team: It will be a great feature if you implement the sslh package (just like OPNsense did). I use it for OpenVPN server on my pfSense and forward to my internal HTTPS server, both on port tcp/443. I have one 1 public IPv4 IP from my provider but can run multiple services. https://github.com/yrutschle/sslh/blob/master/README.md and https://ostechnix.com/sslh-share-port-https-ssh/
Kind regards,
fluxi
-
The 'correct' way would be to add an rc.d start script for it like:
https://docs.netgate.com/pfsense/en/latest/development/boot-commands.html#shell-script-optionBut you could just use a shellcmd.
Steve
-
@stephenw10 Thx! It works :-)