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

    Looking for guide to route LAN traffic through VPN by port

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 2 Posters 158 Views 1 Watching
    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.
    • D Offline
      david283
      last edited by

      I used to have a guide that helped me setup OpenVPN and some routing to route traffic through the VPN based on ports, but I cant find it now.

      Could someone point me to a guide that could help me?
      The setup is similar to this =
      https://forums.lawrencesystems.com/t/how-to-setup-pfsense-openvpn-policy-routing-with-kill-switch-using-a-privacy-vpn-youtube-release/12441

      But again, instead of routing all traffic from a LAN IP to Openvpn, I instead funnel any outbound LAN traffic in a port range to the VPN Gateway, and if the VPN is down the traffic is killed.

      My tech level is low, so a set by step guide would be very helpful. Thanks!

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

        @david283 said in Looking for guide to route LAN traffic through VPN by port:

        instead of routing all traffic from a LAN IP to Openvpn

        I haven't seen the video (again) but it already has policy-routing in the name, so it is hard to imagine, where your actual problem lies.

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          david283 @Bob.Dig
          last edited by david283

          @Bob.Dig

          Well, I have watched the video, and it shows me how to add the LAN IP's for selected devices to an alias, and then apply rules that will send traffic from that alias out the gateway.

          The problem is this would send all traffic for the selected devices/IP's out the gateway. This isn't what I want.

          Instead, I want to forward a range of ports out the gateway. This would mean that all devices on my network, regardless of their IP, if they tried to communicate on the selected ports, would be forced out the gateway. But also, any traffic on other ports would go out the normal WAN. So its not all or nothing for my devices.

          I don't have the knowledge to set this up myself, but years ago I found a guide for this. I just cant find it again, or one similar. I am hoping someone can point me to one.

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

            @david283 You just change the rule to source any and set the corresponding destination ports to your liking. It is very simple if you ask me. Maybe show your rule if you still need help.

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