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

    Routing internet traffic to another gateway in LAN

    Scheduled Pinned Locked Moved Routing and Multi WAN
    3 Posts 3 Posters 10.3k 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.
    • S
      sanketgroup
      last edited by

      Hello
      i wan to route certain clients Internet to gateway (router) which is in LAN.
      I do not want to forward their internet request directly to WAN, instead i want to forward them another router in LAN.

      for e.g

      If source IP is 192.168.2.20 then use gateway 192.168.2.1 (LAN) for internet
      If source IP is 192.168.2.30 then use gateway WAN for internet

      how can i setup this? Pls help.

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

        Go to System > Routing gateway tab and add the alternativ Gateway there.
        In Firewall > Aliases add an alias with all host, that should use this gateway.

        Then you have to add firewall rules for the concerned host in which you select the gateway. If you only have the default allow rule on LAN interface, click the + sign beside the rule to add a new rule based on this one. Add source enter the alias you've made above, go down to advanced features > gateway and select your alternative gateway. Save it with a new name. Select the new rule and put it to the top.

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          This seems like a asynchronous routing issue to me…  so when you route traffic through pfsense to a lan IP as a gateway.  What keeps the return traffic from just going to the client directly?

          Better option here would be to just create routes on that client to use that lan IP as its gateway for networks you want to get to, or even default, etc..

          if you have a downstream router that you want to use to get to internet or other networks for some clients then that router should be on a transit network between it and pfsense so you don't run into asynchronous routing.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

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