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

    PfSense as OpenVPN server only

    OpenVPN
    5
    13
    13.1k
    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.
    • M
      mrbostn
      last edited by

      Hi, Just need some pointers on getting this to work…

      Can I put a pfSense box either behind or in front of a Sonicwall and have the Sonicwall Continue doing what it's doing-but have pfSense act as the OpenVPN server? The Sonicwall VPN client cost $$ and it's not working well on Macs.

      Thank you

      1 Reply Last reply Reply Quote 0
      • H
        heper
        last edited by

        yes

        1 Reply Last reply Reply Quote 0
        • M
          mrbostn
          last edited by

          @heper:

          yes

          Thank you.

          Would you recommend the pf box be In front of or in back the Sonicwall? I was thinking in back of the Sonicwall with port 1194 forwarded from the Sonicawall to pfSense.

          1 Reply Last reply Reply Quote 0
          • GruensFroeschliG
            GruensFroeschli
            last edited by

            That depends on your network setup.

            If it is in front, then traffic from the OpenVPN server will have to pass though the Sonicwall.
            –> Allows you to handle OpenVPN traffic with rules on the Sonicwall.

            If it's behind the sonic wall, you will have to handle access-right on the pfSense itself (basically you need to manage two sets of firewall rules).
            Also if it's behind the sonic wall: Your clients will probably have the sonicwall as default gateway.
            --> Traffic from OpenVPN will need to be sourceNATed on the pfSense (not so much desirable...) or all clients/server have a static route pointing to the pfSense (also not desirable) or you have static routes on the sonicwall which also might lead to problems (traffic going in and out on the same interface).

            We do what we must, because we can.

            Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

            1 Reply Last reply Reply Quote 0
            • M
              mrbostn
              last edited by

              @GruensFroeschli:

              That depends on your network setup.

              If it is in front, then traffic from the OpenVPN server will have to pass though the Sonicwall.
              –> Allows you to handle OpenVPN traffic with rules on the Sonicwall.

              If it's behind the sonic wall, you will have to handle access-right on the pfSense itself (basically you need to manage two sets of firewall rules).
              Also if it's behind the sonic wall: Your clients will probably have the sonicwall as default gateway.
              --> Traffic from OpenVPN will need to be sourceNATed on the pfSense (not so much desirable...) or all clients/server have a static route pointing to the pfSense (also not desirable) or you have static routes on the sonicwall which also might lead to problems (traffic going in and out on the same interface).

              Understood…My thinking was in back-as I just modified my post a few minutes ago to reflect that-turns out not a good idea.

              I'll look to put it in front of the Sonicwall. Thank you for the input.

              1 Reply Last reply Reply Quote 0
              • H
                heper
                last edited by

                depending on what is considered "front" & "back"

                personally i'd go:

                internet <--> sonicwall <--> LAN clients + Pfsense
                

                or even better:

                Internet <--> Pfsense <--> LAN clients
                

                pfsense can handle firewalling/router + openvpn at the same time if you don't have unreasonably high bandwidth requirements.

                1 Reply Last reply Reply Quote 0
                • GruensFroeschliG
                  GruensFroeschli
                  last edited by

                  @heper:

                  personally i'd go:

                  internet <--> sonicwall <--> LAN clients + Pfsense
                  

                  I disagree.
                  You'll run into the problems i described above.
                  Of course if your roadwarriors only need access to some servers, then it's probably easier to just add static routes on the servers.
                  But with this setup you will have a headache getting the roadwarriors to connect to local clients.

                  We do what we must, because we can.

                  Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                  1 Reply Last reply Reply Quote 0
                  • M
                    mrbostn
                    last edited by

                    @heper:

                    depending on what is considered "front" & "back"

                    personally i'd go:

                    internet <--> sonicwall <--> LAN clients + Pfsense
                    

                    or even better:

                    Internet <--> Pfsense <--> LAN clients
                    

                    pfsense can handle firewalling/router + openvpn at the same time if you don't have unreasonably high bandwidth requirements.

                    I'd love to get rid of the Sonicwall but that won't happen. Basically the company has an an IT person, but I help him with projects on occasion. He's been asking me to look for a way to get Mac clients to connect from home via vpn. He tells me that the Sonicwall client is buggy.

                    Which led me to thinking I could utilize OpenVPN on pfSense. Thanks to you both.

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

                      It's not quite as problematic as others have mentioned here. We have quite a few customers running this way.

                      Just add pfSense either in parallel to, or behind the SonicWALL.

                      Add a static route on the SonicWALL that points your mobile client subnet at the pfSense firewall's IP.

                      On pfSense, make sure you check System > Advanced, "Bypass firewall rules for traffic on the same interface"

                      Everything should route happily and as expected. There may be a rare occasion where some mildly broken TCP stack doesn't obey the ICMP redirects for such a route but it's not that common.

                      We have one customer running a sizable call center using a SonicWALL and pfSense in this type of scenario (SonicWALL as default gateway, pfSense as VPN router), and they have no problems.

                      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
                      • GruensFroeschliG
                        GruensFroeschli
                        last edited by

                        Oh it not that problematic if you know what you are doing.
                        I run it this way myself In multiple locations :)
                        Just saying that if you have unexpected results it might be another thing which can be the source of trouble.

                        We do what we must, because we can.

                        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

                        1 Reply Last reply Reply Quote 0
                        • D
                          deagle
                          last edited by

                          In this type of setup, where pfsense only has one interface, would it be the LAN or WAN?

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

                            It depends on how you set it up.

                            If you only have one interface, it would be WAN.

                            If you set it up in parallel instead of behind, then it would have two (one external wan, one internal lan)

                            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
                            • D
                              deagle
                              last edited by

                              Thanks guys, I too was missing the static route back into the vpn subnet. It works great now with using just the wan interface.

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