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

    LAN traffic bound for VPN clients not routed correctly in filtering bridge

    Scheduled Pinned Locked Moved OpenVPN
    17 Posts 3 Posters 6.7k 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.
    • P
      podilarius
      last edited by

      Is this a site-to-site VPN or one for road warriors?

      1 Reply Last reply Reply Quote 0
      • C
        cyounkins
        last edited by

        Road warrior.

        1 Reply Last reply Reply Quote 0
        • C
          cyounkins
          last edited by

          Help?  :(

          1 Reply Last reply Reply Quote 0
          • P
            podilarius
            last edited by

            Road Warrior is going to be more difficult as the remote network is going to change between connections. You could route all private nets to the pfSense gateway. Like:

            172.16.0.0/16
            10.0.0.0/8
            192.168.0.0/16

            to <lanip>of the pfsense firewall. If you have control of the gateway that your servers use, you can add the routes there as well.</lanip>

            1 Reply Last reply Reply Quote 0
            • C
              cyounkins
              last edited by

              Pretend I had another machine on the LAN that ran OpenVPN. I believe then I could make it work without much trouble. How can I run OpenVPN on the pfSense box, using an OPT port connected to the LAN switch, as if it was a different machine?

              1 Reply Last reply Reply Quote 0
              • P
                podilarius
                last edited by

                I am not sure an OpenVPN server behind the firewall would work. You would still have a broken route. I think you can use OpenVPN and give the remote connector a LIVE ip address at your DataCenter, but you would have to have a live IP for each connection. Past that, just think how packets would route once they arrive at the server.

                1 Reply Last reply Reply Quote 0
                • C
                  cyounkins
                  last edited by

                  This doesn't seem that hard to me, so I must be missing something. Let's say I had a server on the LAN to serve this purpose.

                  A client connects via the server's public IP. It gets a virtual IP (from OpenVPN dhcpd) on it's virtual tun interface and creates a route for the virtual network through the tun adapter.
                  The server NATs the client's virtual IP address to it's own public one, and passes the packet to its destination. When packets comes back to the OpenVPN server it NATs it back to the virtual IP address and sends it across the tun adapter. The client routes traffic to the tun adapter according to the routes pushed from OpenVPN.

                  1 Reply Last reply Reply Quote 0
                  • P
                    podilarius
                    last edited by

                    There is documentation covering that. look in docs.pfsense.org or buy the official book. I have not setup OpenVPN in that way. Mainly because I don't run a bridge. What could be better (if it even exists) is a knock routine that opens the firewall to a particular source if the correct packets are sent to the correct series of ports.

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      In this kind of situation, you might be better off running OpenVPN in tap mode and handing out some IPs in your public bridged segment to your connecting OpenVPN clients. 2.0 was broken for such a tap bridge, but I have recently fixed it up and made a package to apply the fixes to 2.0.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • C
                        cyounkins
                        last edited by

                        I sidestepped this issue by changing to 1:1 NAT with a separate subnet for VPN clients.

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