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

    Unable to connect to mutiplied pfsense based openvpn server

    Scheduled Pinned Locked Moved OpenVPN
    5 Posts 2 Posters 673 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.
    • H
      hd_tn
      last edited by

      I am having this problem with connecting to multiplied pfsense based openvpn server at the same time with openvpn client for Windows 10.

      I have 7 taps installed and it works fine on centos based openvpn server but with pfsense I just get the error: Connecting to VPN has failed.

      Logfile from OpenVPN client:
      Wed Jan 29 14:39:07 2020 OpenVPN 2.4.8 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Oct 31 2019
      Wed Jan 29 14:39:07 2020 Windows version 6.2 (Windows 8 or greater) 64bit
      Wed Jan 29 14:39:07 2020 library versions: OpenSSL 1.1.0l 10 Sep 2019, LZO 2.10
      Enter Management Password:
      Wed Jan 29 14:39:09 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]xxx.xxx.xxx.xxx:1194
      Wed Jan 29 14:39:09 2020 TCP/UDP: Socket bind failed on local address [AF_INET6][undef]:1194
      Wed Jan 29 14:39:09 2020 Exiting due to fatal error

      Even changed port for openvpn while testing so it looks like this:
      PFsense VPN server 1 is running on port 1194
      PFsense VPN server 2 is running on port 1195

      Anyone have an idea how to fix this because it's nessary to be connected to both servers at once because VPN server 2 are only allowed to communicate on ports 1194-1196 and others cannot be opened and ipsec doesn't work if it did I would set up IPSec from server 1 to server 2 and use one vpn to server 1 or 2 and my problem would be solved.

      1 Reply Last reply Reply Quote 0
      • V
        viragomann
        last edited by

        Do you have an lport line in the clients configs? If not try to add the line

        lport 0
        

        to it.

        H 1 Reply Last reply Reply Quote 0
        • H
          hd_tn @viragomann
          last edited by

          @viragomann I do not have lport 0 in the client config anywhere specific in the config where it needs to be inserted?

          1 Reply Last reply Reply Quote 0
          • V
            viragomann
            last edited by

            lport is the local port, the OpenVPN client instance binds to. It should default any if it's not stated, but maybe that doesn't work in your set up.

            lport 0
            

            sets the port to any, which means OpenVPN should select the next free port. So you may give it a try.

            H 1 Reply Last reply Reply Quote 1
            • H
              hd_tn @viragomann
              last edited by

              @viragomann said in Unable to connect to mutiplied pfsense based openvpn server:

              lport is the local port, the OpenVPN client instance binds to. It should default any if it's not stated, but maybe that doesn't work in your set up.

              lport 0
              

              sets the port to any, which means OpenVPN should select the next free port. So you may give it a try.

              I haven't seen this as default in any config for openvpn that I work with but it connects and I can ping so far it's working thank you @viragomann

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