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

    VPN and Dedicated servers

    Scheduled Pinned Locked Moved General pfSense Questions
    10 Posts 3 Posters 973 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.
    • T
      TunnlRat
      last edited by

      Maybe this has been answered somewhere else and someone could direct me to the post. I am in Canada and have up until now not used a VPN with our laws potentially changing up here I am looking at using a VPN with my pfsense router. I don't mind if everything is all tunneled through the same server that's not an issues.

      What I am wondering is if I can have a specific computer connected to the router not run through the VPN in order to run a dedicated server for games. Or will I need each computer to potentially connect to the VPN and not have the router itself run all the traffic through the VPN.

      G NollipfSenseN 2 Replies Last reply Reply Quote 0
      • G
        gabacho4 Rebel Alliance @TunnlRat
        last edited by

        @tunnlrat you can absolutely have some computers run over the VPN and other run out the local WAN connection. What you are looking for is called policy based routing (PBR). Basically, once you have your VPN connection set up over OpenVPN or Wireguard or a VTI IPSEC, you create firewall rules that tell the router to direct traffic for a specific IP or an alias containing multiple IPs through the VPN gateway. The same can be done for other IPs and you'd specify the local WAN. Fairly simple to implement but oh so powerful.

        T 1 Reply Last reply Reply Quote 0
        • NollipfSenseN
          NollipfSense @TunnlRat
          last edited by

          @tunnlrat said in VPN and Dedicated servers:

          if I can have a specific computer connected to the router not run through the VPN in order to run a dedicated server for games.

          In this case, I would recommend a DMZ: http://www.netgate.com/resources/videos-creating-a-dmz-on-pfsense

          pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
          pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

          1 Reply Last reply Reply Quote 0
          • T
            TunnlRat @gabacho4
            last edited by

            @gabacho4 Perfect so I can just create a policy for the one system that does nothing but run my dedicated servers and the rest can all just run the the VPN.

            Does having the router itself connecting to the VPN count as a single connection even if there are 10 items behind it all connecting through the router?

            G 1 Reply Last reply Reply Quote 0
            • G
              gabacho4 Rebel Alliance @TunnlRat
              last edited by gabacho4

              @tunnlrat as mentioned by @NollipfSense it might make sense to put your game server on another subnet or vlan for isolation from your main network.

              In that case, you would just set a rule on the firewall tab for the server subnet/vlan which would be a allow TCP/UDP (or whatever protocols you need) from VLAN_NET to ANY.

              For all your other devices on LAN or whatever you call it, you will want to create a allow any protocol from LAN_NET to ANY and then click the advanced button and go down to gateway and select the VPN gateway.

              All your LAN traffic will go out over VPN while the server traffic will be out local WAN.

              Also, I'd recommend that you go to System -> Routing and then make sure the WAN gateway is set as the default for your IPV4 and/or IPV6 traffic. T

              T 1 Reply Last reply Reply Quote 0
              • G
                gabacho4 Rebel Alliance
                last edited by

                BTW, I would highly recommend Wireguard for your VPN. Mullvad has a 5 buck a month service that has been great for me and they have a decent number of servers globally.

                1 Reply Last reply Reply Quote 0
                • T
                  TunnlRat @gabacho4
                  last edited by

                  @gabacho4 Excellent this is exactly what I was hoping for. Now I just need to figure out what VPN I want to subscribe to. I am guessing pfsense doesn't have to use OpenVPN?

                  G 1 Reply Last reply Reply Quote 0
                  • G
                    gabacho4 Rebel Alliance @TunnlRat
                    last edited by

                    @tunnlrat read the message I posted right above your last. Wireguard is the way to go if you can. OpenVPN is solid as well but nowhere near as fast or simple to set up. Mullvad provides both OVPN and Wireguard though I have only used them for Wireguard. You just create the key, generate the config, then set your Pfsense box up based on the config file that is produced.

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      TunnlRat @gabacho4
                      last edited by

                      @gabacho4 any speed issues with wireguard? Due to me not being on fiber I am maxed out at 1 gig internet.

                      G 1 Reply Last reply Reply Quote 0
                      • G
                        gabacho4 Rebel Alliance @TunnlRat
                        last edited by

                        @tunnlrat Wireguard is the bomb. You'll get way better performance over it than you will OVPN. Performance will ultimately be based on the power of your router CPU but you will likely be able to push packets at a great rate per second.

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