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

    Bypass VPN using Port

    Scheduled Pinned Locked Moved OpenVPN
    34 Posts 3 Posters 3.4k 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.
    • V
      viragomann @Lockie
      last edited by

      @lockie
      Diagnostics > Routes

      L 1 Reply Last reply Reply Quote 0
      • L
        Lockie @viragomann
        last edited by

        @viragomann Sorry there's lots of private info in there. Is there something you're looking for in particular? I do want to share, I just don't want all my IP's on here :)

        V 1 Reply Last reply Reply Quote 0
        • V
          viragomann @Lockie
          last edited by

          @lockie said in Bypass VPN using Port:

          Sorry there's lots of private info in there.

          Private infos? Private IPs?
          There should be routes at all.
          There is no need to hide private IPs, but public ones possibly.

          Particularly I'd like to check the route pointing to the VPN gateway.

          L 1 Reply Last reply Reply Quote 0
          • Bob.DigB
            Bob.Dig LAYER 8
            last edited by

            What does this plex port do, what is the destination?

            L 1 Reply Last reply Reply Quote 0
            • L
              Lockie @viragomann
              last edited by Lockie

              @viragomann

              V 1 Reply Last reply Reply Quote 0
              • L
                Lockie @Bob.Dig
                last edited by Lockie

                @bob-dig
                See here:
                https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/

                *The most important port to make sure your firewall allows is the main TCP port the Plex Media Server uses for communication:

                TCP: 32400 (access to the Plex Media Server) [required]*

                Bob.DigB V 2 Replies Last reply Reply Quote 0
                • V
                  viragomann @Lockie
                  last edited by

                  @lockie
                  There is not any route pointing to a VPN gateway at all.
                  So basically all upstream traffic should be directed to the WAN gateway, as long as the policy route is not applied to it.

                  Hence the only reason for going out to the VPN, I can think of, is that the packets are caught by the policy routing rule.
                  This would mean, that the "Plex" rule is not applied to it, while the PIA rule is.

                  L 1 Reply Last reply Reply Quote 0
                  • Bob.DigB
                    Bob.Dig LAYER 8 @Lockie
                    last edited by

                    @lockie I am not using plex and it is unclear to me what this port is good for. But maybe you first should create an rfc1819 alias and put it in your vpn rule as an inverted destination.

                    1 Reply Last reply Reply Quote 0
                    • L
                      Lockie @viragomann
                      last edited by

                      @viragomann

                      I don't really understand what this fully means and the result of it that I should look to execute

                      1 Reply Last reply Reply Quote 0
                      • V
                        viragomann @Lockie
                        last edited by

                        @lockie said in Bypass VPN using Port:

                        See here:
                        https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/

                        These ports seems to be incoming ports on the Plex media server. So they cannot be used in the outbound rule.

                        L 1 Reply Last reply Reply Quote 0
                        • L
                          Lockie @viragomann
                          last edited by

                          @viragomann

                          Okay. I'll try and ask my question a bit differently.

                          I'm a beginner in terms of Networking and don't have an understanding of all things networking.

                          I have a single device and I have a router with pfSense. What I'd like to achieve via the router is that almost all traffic on that device goes via a VPN. However, one application on that device (called Plex) needs to be outside that VPN.

                          How can I achieve this?

                          Thank you

                          V Bob.DigB 2 Replies Last reply Reply Quote 0
                          • V
                            viragomann @Lockie
                            last edited by

                            @lockie
                            Filter rules can only determine protocols, IPs and ports.
                            So either get out the destination IP or port you need. Then you can use it in the rule.

                            Since we are bloody newbies on Plex, we don't know it. 😉

                            1 Reply Last reply Reply Quote 0
                            • Bob.DigB
                              Bob.Dig LAYER 8 @Lockie
                              last edited by

                              @lockie said in Bypass VPN using Port:

                              How can I achieve this?

                              Thank you

                              @bob-dig said in Bypass VPN using Port:

                              . But maybe you first should create an rfc1819 alias and put it in your vpn rule as an inverted destination.

                              L 2 Replies Last reply Reply Quote 0
                              • L
                                Lockie @Bob.Dig
                                last edited by

                                @bob-dig
                                Sorry I don't know what this means. Is there a guide on this?

                                1 Reply Last reply Reply Quote 0
                                • L
                                  Lockie @Bob.Dig
                                  last edited by

                                  @bob-dig
                                  Tried to follow this https://docs.netgate.com/pfsense/en/latest/recipes/rfc1918-egress.html

                                  But I seem to get:
                                  Subnet is too large to expand into individual host IP addresses (192.168.0.0/8)
                                  The maximum number of entries in an alias is 5000
                                  192.168.0.0/8 is not a valid address, FQDN or alias.

                                  V 1 Reply Last reply Reply Quote 0
                                  • V
                                    viragomann @Lockie
                                    last edited by

                                    @lockie said in Bypass VPN using Port:

                                    192.168.0.0/8 is not a valid address

                                    As stated in the docs:

                                    10.0.0.0/8
                                    172.16.0.0/12
                                    192.168.0.0/16
                                    
                                    L 1 Reply Last reply Reply Quote 0
                                    • L
                                      Lockie @viragomann
                                      last edited by Lockie

                                      @viragomann
                                      @bob-dig
                                      Ok, this is now configured. What would the next step be?

                                      Bob.DigB 1 Reply Last reply Reply Quote 0
                                      • Bob.DigB
                                        Bob.Dig LAYER 8 @Lockie
                                        last edited by Bob.Dig

                                        @lockie Like I said, put it in your vpn-rules, both of them, as the inverted destination.
                                        If it is not working then you have to show all the rules everywhere and also provide way more information where the plexserver resides, your outbound NAT rules and so on.
                                        Would be much easier if you would learn the basics first.

                                        1 Reply Last reply Reply Quote 0
                                        • L
                                          Lockie
                                          last edited by Lockie

                                          Fix found, for those interested the solution (I needed) can be seen here:
                                          Link
                                          https://www.linuxserver.io/blog/2017-05-01-how-to-run-pfsense-with-pia-vpn-but-still-use-plex-remote-access

                                          The section which is new that appears to fix the issue is named How to bypass VPN for Plex Server connections to plex.tv

                                          But i'd advise following the entire guide to ensure all settings are correct if you have problems still.

                                          Hope this helps!

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