Error when using OpenVPN Client and Server at the same time [solved]



  • Hello!

    I have an OpenVPN site-to-site connection up an running between two pfsense 1.2.3 boxes.

    The following error occurs when configuring an OpenVPN Server on the client box:

    
    openvpn[16125]: TCP/UDP: Socket bind failed on local address [undef]:1194: Address already in use
    openvpn[16125]: Exiting
    

    Is it possible to use pfsense with an OpenVPN server and client at the same time?


  • Rebel Alliance Developer Netgate

    Sure, you may need to use alternate ports though. There is a port field on the client/server config edior.



  • Not sure I understand the problem.  AFAIK, the openvpn client does not need to be configured to use a fixed port, just the server.


  • Rebel Alliance Developer Netgate

    The client also listens on the port for which it is configured, at least for UDP it does, not sure about TCP. You still have to set the port on the client so it knows which port the server side is listening on.



  • In theory. the '–nobind' option tells openvpn 'if you are a client, use a dynamic port'.



  • I played around a bit with the OpenVPN options.

    On box 1: The Server uses port 1194 (UDP); the client uses port 10111 (UDP)
    On box 2: The Server uses port 10111 (UDP)

    When i check the "Dynamic sourceport" checkbox in the client configuration everything seems to work fine!

    openvpn[409]: Initialization Sequence Completed
    

    I will run a few tests later.


Log in to reply