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

    Executing script after OpenVPN has started

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 2 Posters 897 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.
    • pandafyP
      pandafy
      last edited by

      After reading OpenVPN Management interface via TCP, I became aware that it is not possible to set a TCP IP address to the management interface of OpenVPN server on pfSense.

      Hence to mitigate this problem, I am forwarding the TCP traffic on 7505 port to this unix socket using socat through following command:

      socat -d -d TCP4-LISTEN:7505,fork,bind=10.0.0.5 UNIX-CONNECT:/var/etc/openvpn/server1/sock
      

      I have understood that it is possible to execute shell scripts at boot in pfsense, but I have a specific case here. I want to execute this command only after OpenVPN service has been started. Otherwise, the UNIX socket file will not exist and the command will error out. Is there any signal to which I can hook my script?

      noplanN 1 Reply Last reply Reply Quote 0
      • noplanN
        noplan @pandafy
        last edited by

        @pandafy

        dont get me wrong I don't get it.

        you connect with openVPN .. you log in .. and then you have full control of the box if allowed.
        if you want to get always teh same IP for a user usin openVPN use client specific override

        that should do the magic trick.

        otherwise tell us your use case

        br NP

        pandafyP 1 Reply Last reply Reply Quote 0
        • pandafyP
          pandafy @noplan
          last edited by pandafy

          Hi @noplan

          I am interested to access the management interface of OpenVPN over TCP protocol from outside pfSense.

          I hope my use case is clear now.

          you connect with openVPN .. you log in .. and then you have full control of the box if allowed.
          if you want to get always teh same IP for a user usin openVPN use client specific override

          Hence, this does not apply to my use case. :)

          noplanN 1 Reply Last reply Reply Quote 0
          • noplanN
            noplan @pandafy
            last edited by

            @pandafy

            ok, sorry I'm out can't get the benefit, but that's just me.
            of wanna doing something essential on pfS like openVPN with a pretty good webIF outside of pfS
            good luck NP

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