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

    Routing traffic question

    Scheduled Pinned Locked Moved Routing and Multi WAN
    9 Posts 5 Posters 2.0k 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.
    • D
      DrownEnt
      last edited by

      I need some help with a setup.  I understand PFSENSE ok but I have really only done fairly basic setups in the past.  I may have some of the lingo wrong, so let me apologize in advance.  Hopefully this will make sense:

      I need to route all local LAN traffic that is headed out to the subnet of 170.12.0.0/16 to an OPT interface so it can go out through a VPN appliance (Provided to me).  Return traffic will be comming back through the same appliance and into the OPT interface and then needs to be routed back to the LAN.  I do not need any firewall rules associated with this.  All traffic to and from the VPN appliance is trusted.

      All other internet traffic should go through the normal WAN with basic NAT and firewall rules that I understand.

      I am not sure how to set this up.  I have tried searching, but either I am not using the correct lingo, or this is really an odd thing to do.

      Thank you,

      Ryan

      1 Reply Last reply Reply Quote 0
      • kesawiK
        kesawi
        last edited by

        See /index.php?topic=106305.0, specifically parts 9 & 10.

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

          Thank you for the reply, but I am not following how that applies.  I understand that is putting in firewall rules, but those do not actually route the traffic to a separate interface do they?

          1 Reply Last reply Reply Quote 0
          • kesawiK
            kesawi
            last edited by

            Sorry I skim read your post on my phone and misunderstood what you are trying to do. I thought you were doing something else.

            I don't know if this would be the correct way to do it or whether it would work, but you could create a gateway on OPT1 and assign your VPN appliance as the gateway IP, and then create a route for 170.12.0.0/16 to this new gateway.

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

              @DrownEnt:

              I need some help with a setup.  I understand PFSENSE ok but I have really only done fairly basic setups in the past.  I may have some of the lingo wrong, so let me apologize in advance.  Hopefully this will make sense:

              I need to route all local LAN traffic that is headed out to the subnet of 170.12.0.0/16 to an OPT interface so it can go out through a VPN appliance (Provided to me).  Return traffic will be comming back through the same appliance and into the OPT interface and then needs to be routed back to the LAN.  I do not need any firewall rules associated with this.  All traffic to and from the VPN appliance is trusted.

              All other internet traffic should go through the normal WAN with basic NAT and firewall rules that I understand.

              I am not sure how to set this up.  I have tried searching, but either I am not using the correct lingo, or this is really an odd thing to do.

              Thank you,

              Ryan

              you need to add a gateway to the opt interface.
              create rule on lan like this: PASS / proto:any  / src:lan-network / dst: 170.12.0.0/16 / gateway: opt_gateway
              be sure to put the rule high enough in the list so that it get matched before an allow_all_rule.

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                Do you want all traffic in the firewall with a destination of 170.12.0.0/16 to go to the gateway or just traffic from LAN?

                If it's all traffic I would probably use a static route not policy routing.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                  I do want all traffic in the IP range to go out the OPT connection.  So it sound like a static route is best.  I just don't understand how to set that up.

                  1 Reply Last reply Reply Quote 0
                  • C
                    cuteredstorm
                    last edited by

                    First you didn't mention what the IP of your OPT interface is. If it is in the 170.12.0.0/16 subnet, the static route would have been created by pfSense itself. So I will assume it is not in this subnet.

                    You would start by creating a gateway in System->Routing:
                    Interface: OPT
                    Gateway: IP of the gateway directly connected to the 170.12.0.0/16
                    Default: no
                    Disable gateway monitoring: no
                    Save

                    On next tab (routes) create a route:
                    170.12.0.0/16
                    Gateway: the one you just created.

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

                      Thank you!

                      That was actually much easier than I thought.  I guess I was over thinking it.

                      Ryan

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