OpenVPN client thru non-default Gateway?



  • I have successfully set up OpenVPN between 2 pfSense 1.2 boxes. Everything works just fine EXCEPT:

    I use policy based routing to define which of WAN or WAN2 (OPT1) gateways is used based on ports, networks, etc (this all works fine too).

    But I want my OpenVPN client to go out over WAN2 not the default gateway, and I have been unable to figure out how to do this. I've tried the following rules:

    *  *  *  (destination server)  1194 (OpenVPN)  Gateway WAN2

        • (internetwork) *         Gateway WAN2
        • (destination network)     *               Gateway WAN2

    But the VPN always forms from the Default Gateway.

    Is there a magic command I can put in somewhere to force it to use the other gateway?



  • When using OpenVPN with your WAN2 link, make sure you are NOT using UDP as the protocol.  Change it over to TCP and you should notice your link working fine.  pfSense has issues with UDP access on the WAN2 (OPTx) ports.

    Good luck! :)



  • I'm having a similar issue. I got the clients connecting to my WAN2 via TCP 1194, but when they exit to the internet via the VPN they keep going out the WAN and not my WAN2.

    How can I force them to go out WAN2? IS there something in the server config?





  • I have the same problem,
    I try to use an static route with the server ip connection (openvpn) but when I
    go to system logs - openvpn, I see the gw of wan1,
    I don´t know how to use the gateway of wan2 with openvpn (client side).
    Somebody help?
    Sorry for my bad english…...


Log in to reply