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

    Routing all Lan traffic over OpenVPN client

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 828 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.
    • G
      garethrobson
      last edited by

      I have set up an openVPN client on a fresh pfsense installation. The openVPN client is up and running and I can successfully ping internet based ip addresses by selecting OPENVPN client as the source.

      I have created a virtual interface mapped to the openVPN client. I can successfully ping internet facing ip addresses using OPT1 (the virtual interface).

      I have the checkbox for BOTH enabled on the openVPN client to create the gateways required. I have set the monitoring IP on the gateway as an internet IP address (8.8.4.4) and the gateway is reporting its up, so must have internet access.

      I have set both the IPv4 version and IPv6 version of these gateways as the default and checked my catchall LAN firewall rule is set to use this gateway.

      For some reason...I have no internet access on a networked computer that is configured to use the pfsense as its default gateway. I cannot ping any internet IP addresses.

      If I set up a constant ping to 8.8.8.8 ,When running a packet capture on the LAN I can see the traffic. When I run a packet capture on the OPENVPN interface I can also see the traffic so im not sure where it is all failing.

      Can anybody think of something I may have missed?

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        So did you create your outbound nat for your traffic flowing through the vpn connection?

        Pfsense can talk through the vpn because it has an IP given to it by the vpn server it connected to as a client. but your lan devices IP need to be natted to this connections IP..

        This is normally done by switching to hybrid mode on your outbound nat and creating the nat.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • G
          garethrobson
          last edited by

          Ah ok thanks I had a feeling it would be outbound NAT but having not played with this much I was a little lost. It was in Automatic mode and I tried setting up a rule but it said this rule is being ignored.

          IL try fiddling with the outbound NAT tomorrow

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            example here I only every policy route out my box on my lan which is on 192.168.9/24 for testing stuff.. And if I ever need to do some other vlan on my network, its simple enough to just add it to the outbound nat.

            0_1533671410709_outboundnat.png

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • G
              garethrobson
              last edited by

              Yep looks like I've done EVERYTHING except switch from automatic to hybrid mode hence why my rule "is being ignored". Doh!

              IL give it a try in the morning thanks for the help

              1 Reply Last reply Reply Quote 0
              • RicoR
                Rico LAYER 8 Rebel Alliance
                last edited by

                Jim Pingle did a very great Hangout for OpenVPN as a WAN, you can check it out on Youtube: https://www.youtube.com/embed/lp3mtR4j3Lw

                -Rico

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