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.
    • L
      Lockie
      last edited by

      Hi,

      I have a VPN setup so all traffic from a specific Aliases IP goes through that VPN.

      However, there is one segment of traffic I do NOT want going via the VPN (relates to Plex). The is traffic from the Aliases IP on Port 32400.

      Now I thought this could be achieve with another LAN rule above the VPN rule set which simply contains the port (in this case Aliases Port). To show you what I mean here is my setup:
      2021-11-22_14h49_43.png

      But, this doesn't appear to work. Could someone help me understand if this is possible and also how it can be done?

      Many Thanks

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

        @lockie
        Presumably you should leave the source port at "any", since they are almost dynamic.

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

          @viragomann I've changed it to the below but it doesn't appear to make a difference in terms of working.

          91be4f97-582a-4d01-b29d-3f500337ab7b-image.png

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

            @lockie said in Bypass VPN using Port:

            The is traffic from the Aliases IP on Port 32400.

            Is this the only one port within the Plex alias?
            Is it the destination or source port?

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

              @viragomann No, the ports in that alias are:
              5d8b933d-ed82-49dd-8270-c4957ae1500b-image.png

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

                @viragomann I have also tried a single port like so with the same result:
                50af3a76-251d-46a7-b544-7c9bf7cc42c1-image.png

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

                  @lockie
                  I'm in doubt that these all ports are meant to be directed out to the WAN gateway. You might need some of theme for internal communications relating to Plex. So you must not state a gateway in the rule.

                  Since you do policy routing for the VPN, I assume, WAN is still your default gateway anyway. So there is no need to state a gateway in this rule. Just set the rule above the VPN policy routing rule.

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

                    @viragomann do you mean like this?

                    0e6d3e36-255c-4956-9a58-33a4422b25f8-image.png

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

                      @lockie
                      Exactly.

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

                        @viragomann K, because that doesn't appear to work.

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

                          @lockie
                          Does it work in any case, apart from policy routing?

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

                            @viragomann I don't know what you mean?

                            My initial question was how can I route traffic from a single IP and Port to WAN instead of VPN. I don't know what works because I've not got it working.

                            What I have working is routing traffic based on an IP to VPN.

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

                              @viragomann as an additional note I can see that when testing Plex via its interface. It's still using a Public IP of the VPN and not of the WAN. So I assume the traffic is not getting forwarded correctly to the WAN instead of the VPN based on the port.

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

                                @lockie
                                So I suspect, the you have the default route pointing to the VPN gateway. This might not be that what you want indeed, since you set up a policy routing rule for the VPN.

                                To investigate, please post the IPv4 routing table.

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

                                  @viragomann
                                  615b2a10-22d0-4e89-8e07-fab0bf324fbe-image.png

                                  V 1 Reply Last reply Reply Quote 0
                                  • 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
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.