OpenVPN Routing Issue



  • Hello all,

    We have created OpenVPN server in Pfsense.
    For reference purpose, We have attached screenshot of the infrastructure.

    Scenario:

    Home users get connected to OpenVPN server through OpenVPN client.
    VPN Network : 10.0.8.0/24
    Office LAN Network : 192.168.0.0/24
    Home user network : any network apart from 192.168.0.0/24

    We have a remote site where PfSense is installed in Xenserver as a Virtual Machine and the local LAN is behind this PfSense.
    Remote Local LAN : 192.168.55.0/24

    Now the issue is,
    Through OpenVPN client,we can connect to the local LAN at the office through VPN but we can't connect to the remote site ( 192.168.55.0/24 ).
    ![OpenVPN Tunnel.png](/public/imported_attachments/1/OpenVPN Tunnel.png)
    ![OpenVPN Tunnel.png_thumb](/public/imported_attachments/1/OpenVPN Tunnel.png_thumb)



  • i have pretty much the same setup. But i use openvpn instead of ipsec to connect the pfsense boxes and it works fine. Is this a possibility for you to switch from ipsec to openvpn ?



  • IPSec tunnel is for site to site VPN connection for connectivity between our office and remote site.
    So we can connect to our servers with the local IP addresses.
    Home users need to connect through OpenVPN client to our OpenVPN server and then they want to connect to any of the servers that are connected through IPSec tunnel.


  • LAYER 8 Netgate

    So all your OpenVPN clients appear to the office network as tunnel network addresses on 10.0.8.0/24? Remote Access-style so no remote networks there?

    Did you add an IPsec Phase 2 for 10.0.8.0/24 <==> 192.168.55.0/24 on both sides of the IPsec tunnel?

    If the OpenVPN clients are not set with Redirect Gateway did you add 192.168.55.0/24 to the local networks in the OpenVPN server?

    Do the firewall rules on OpenVPN and IPsec pass the necessary traffic?



  • So all your OpenVPN clients appear to the office network as tunnel network addresses on 10.0.8.0/24? Remote Access-style so no remote networks there?

    -> There are no remote networks there. We just want to connect from our home networks through our local PfSense.

    Did you add an IPsec Phase 2 for 10.0.8.0/24 <==> 192.168.55.0/24 on both sides of the IPsec tunnel?

    -> Have added Phase 2 entry for 10.0.8.0/24 on remote side. Local side I have already added Phase 2 entry for 192.168.55.0/24.

    If the OpenVPN clients are not set with Redirect Gateway did you add 192.168.55.0/24 to the local networks in the OpenVPN server?

    -> Have already added the network 192.168.55.0/24 in the local networks section in OpenVPN server

    Do the firewall rules on OpenVPN and IPsec pass the necessary traffic?

    -> The default rules are set for OpenVPN. No additional firewall rules have been configured as we can easily communicate with remote side from our local LAN ( 192.168.0.0/24 )


  • LAYER 8 Netgate

    Then post up because if it is all as you say it would be working.



  • Thank you for your reply.

    Do I need to add routes for VPN networks on the remote side or any extra configuration on OpenVPN server ?


  • LAYER 8 Netgate

    As already discussed, there needs to be an IPsec phase 2 on the remote side for the OpenVPN tunnel network (so traffic from LAN to the OpenVPN tunnel network is "interesting" to IPsec) and there needs to be an OpenVPN "Local Network" for the remote side in the OpenVPN server (That adds a route to the client so it knows to route traffic for the remote side through OpenVPN.)

    And the firewall rules need to pass the traffic.



  • Have added Phase 2 entries for VPN network ( 10.0.8.0/24 ) and remote network ( 192.168.55.0/24 ) on both local and remote side.
    Needed to add manual route for network 192.168.55.0/24 on windows system which is OpenVPN client.
    Now I was able to communicate to the remote LAN systems.

    PfSense doesn't push routes on client's machine. Is there any issue with the PfSense openvpn configuration ?


  • LAYER 8 Netgate

    pfSense OpenVPN pushes routes just fine. Has to use SSL/TLS mode though, not PSK, but that is how OpenVPN works.



  • Had used SSL/TLS mode but then also have to give manual routes in windows client machine to be able to get connected.


  • LAYER 8 Netgate

    Must've done something wrong.



  • I have sent attachments of my configuration, openvpn rules, phase 2 entries in ipsec tunnel on local and remote site.









    ![Local Site Phase 2.png](/public/imported_attachments/1/Local Site Phase 2.png)
    ![Local Site Phase 2.png_thumb](/public/imported_attachments/1/Local Site Phase 2.png_thumb)
    ![Remote Site Phase 2.png](/public/imported_attachments/1/Remote Site Phase 2.png)
    ![Remote Site Phase 2.png_thumb](/public/imported_attachments/1/Remote Site Phase 2.png_thumb)



  • You don't seem to be consistent with your local/remote IPs:

    Are you using 192.168.5.0/24 or 192.168.0.0/24? (See Phase 2 images)


  • LAYER 8 Netgate

    Those examples don't show the Phase 2 in question (OpenVPN Tunnel <==> Far side LAN).

    There are usually options to not pull routes on OpenVPN clients. It is Don't pull routes in pfSense.



  • I have two PfSense firewalls running on the same versions 2.3.2
    I have entered IPSec 2nd Phase entries of VPN Network ( 192.168.5.0/24 ) and Remote Firewall ( 192.168.55.0/24 ) on both sides.
    When I connect to VPN, I can connect to all the systems behind the LAN.

    But the same process I am doing on the PfSense running version 2.2, I am not able to connect.
    Is PfSense versioning really a big concern ?


  • LAYER 8 Netgate

    Yes. Upgrade.


Log in to reply