Access LAN via OpenVPN Server and pfSense OpenVPN Client



  • Hello,

    I need your help to setup the following small infrastructure.

    I have a LAB on my School network, all network traffic goes through my pfSense, before going out on the School's network and then on the Internet.
    I also have a Debian VPS server with an OpenVPN server on it.

    As on the following picture :

    pfSense_network.png

    • I would like that a specific interface/LAN of my pfSense (LAB network traffic), go to the OpenVPN server on the cloud VPS instead of the School network.
    • And I'd like to be able to access to this LAB network from my home (OpenVPN Client) connected on the same VPS server.

    Could anyone tell me if it's possible, if yes, how can I setup this ?

    (The pfSense OpenVPN Client connection to the VPS OpenVPN Server seems working)

    Thanks very much in advance !

    Kevin.



  • @keviiin38 said in Access LAN via OpenVPN Server and pfSense OpenVPN Client:

    I have a LAB on my School network, all network traffic goes through my pfSense

    So I assume, pfSense is the default gateway on the LAB network.

    @keviiin38 said in Access LAN via OpenVPN Server and pfSense OpenVPN Client:

    I would like that a specific interface/LAN of my pfSense (LAB network traffic), go to the OpenVPN server on the cloud VPS instead of the School network.

    You can do that by a policy routing rule on pfSense. https://docs.netgate.com/pfsense/en/latest/book/multiwan/policy-routing-configuration.html
    First you have to assign an interface to the OpenVPN clients instance and activate it. After that you should be able to select the appropriate gateway in the firewall rule.
    Additionally you have to add the route for the LAB network to OpenVPN servers settings pointing to pfSense.

    @keviiin38 said in Access LAN via OpenVPN Server and pfSense OpenVPN Client:

    And I'd like to be able to access to this LAB network from my home (OpenVPN Client) connected on the same VPS server.

    Add the route for the LAB network to OpenVPN servers settings for the home client.
    On pfSense add a route for the clients tunnel IP pointing to the VPN server. This can be done by the "Remote Network/s" box in the OpenVPN client settings on pfSense.



  • @viragomann said in Access LAN via OpenVPN Server and pfSense OpenVPN Client:

    So I assume, pfSense is the default gateway on the LAB network.

    Yes right, all network traffic of the LAB pass throught the pfSense.

    Thanks very much for the answer @viragomann !!
    I'll try all that asap and tell you if it worked or if I've other questions !


Log in to reply