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

    [SOLVED] Add one of OpenVPN interfaces as pfSense interface

    OpenVPN
    3
    6
    10.4k
    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.
    • iorxI
      iorx
      last edited by

      Hi!

      Searched high and low and can't find if this is even an valid option. Please direct me if the info is available as my google-fu is letting me down  :( .

      "Interface/(assign)/Available network ports" and adding for example "opvpns2()" which is a OpenVPN server instance.

      I would like to do this because monitoring and rules specific to a OpenVPN instance. I've got multiple site-to-site (client and server) and user-client-connect OpenVPNs running.

      Brgs,

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        why do you not just look at the assign interface tab - you can clearly assign a openvpn instance to a opt interface..

        As you can see I have my vpn client vpn connection assigned to an interface I call ns1vpn, and I have 2 other openvpn instances I could assign to interfaces as well.

        assigninterfaces.png
        assigninterfaces.png_thumb

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • iorxI
          iorx
          last edited by

          Did that and got all sort of problems. Tried it with one och server interfaces. A new rules tab comes available for that OPT. Set IPv4 any-any, but could not get it to pass traffic to the LAN after that. Something I'm missing here?

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            When you do create an openVPN assigned interface it is disruptive to the VPN. You need to stop and restart that OpenVPN service afterwards.

            https://www.infotechwerx.com/blog/Creating-OpenVPN-Assigned-Interface

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 2
            • iorxI
              iorx
              last edited by

              Hi!
              Thank you. That solved the weirdness I experienced the first time I tried this.

              My procedure went like this.

              • Assign the OpenVPN server interface to an OPT

              • Enabled and renamed the OPT. Left the IPv4/v6 config, defaults, to "none"

              • Restarted the OpenVPN instance for the interface

              Works as before, traffic is passed as it should.

              No rules added to the new interface. I presume the overall rule for OpenVPN is still acting on this interface(?)

              I suppose adding rules to the assigned interface allows us to have specific rules for that OpenVPN instance?

              Brgs,

              1 Reply Last reply Reply Quote 1
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                You're better off if rules on the OpenVPN tab don't match traffic for the assigned interface.

                I generally delete all the rules on the OpenVPN tab when I use assigned interfaces.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

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