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

    Make a static route with specified tcp port

    Scheduled Pinned Locked Moved Routing and Multi WAN
    6 Posts 2 Posters 782 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.
    • M
      mlcaffaro
      last edited by

      Hello, i have a pfsense installed and i need make a static route to only a specified ip/network access the tcp 80(http) in secondary gateway. Anyone can help-me?

      tks

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

        Routes don't know about ports.. You could create a firewall rule with dest ip/port that sends traffic down a specific gatway.

        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.8, 24.11

        1 Reply Last reply Reply Quote 0
        • M
          mlcaffaro
          last edited by

          but my gateway is a specified ip in network and dont have a interface associated. For sampelo, the network 192.168.9.x gateway is 192.168.9.254 but this rules need work with only to tcp port.

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

            Create a gateway in pfsense, and then policy route it via firewall rule. You don't need a interface, just a gateway.

            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.8, 24.11

            1 Reply Last reply Reply Quote 0
            • M
              mlcaffaro
              last edited by

              I make a new gateway in system/routing/gateways and choose lan interface and in gatewy ipaddress i put the 192.168.9.24 and mark the option use non-local gateway through interface specific route. In rules i create a rule firewal/rules/lan source singles host or alias (192.168.7.34) destination any port http 80. but when i try to acces a site or make a telnet in tcp port and dont work :(

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

                sound like you have asymmetrical mess if your gateway is going to be out your lan interface. Why don't you draw up your network and point out exactly what your trying to do..

                ption use non-local gateway through interface specific route

                How is it you would be hitting a "gateway" that is not on the same network?

                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.8, 24.11

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