Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Start service sslh at boottime

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 210 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fluxi
      last edited by

      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.pkg

      Now, 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 HERE

      I 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

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        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-option

        But you could just use a shellcmd.

        Steve

        F 1 Reply Last reply Reply Quote 0
        • F
          fluxi @stephenw10
          last edited by

          @stephenw10 Thx! It works :-)

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.