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

    Force all traffic to a specific website over one interface?

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

      is this possible? if it is I assume its a firewall rule. I took a look at the options and im unsure of how I should enter it as destination..

      here is how I think I should set it up as:

      Pass
      Interface Lan
      TCP (since its over port 80)
      Source LAN Net
      Destination Single Host or Alias (www.website.com)
      Destination Port range 80:80
      Gateway : default
      State: Keep State

      and I would place this rule ABOVE loadbalance?

      I have NO DMZ. I have one LAN net with wireless bridged to it. I have 2 WANs. Using 1.2.3-RC1.

      Am I on the right track with this? I dont want to try it in case I bork my load balancing or somethign…

      1 Reply Last reply Reply Quote 0
      • S
        SuperK
        last edited by

        ok so I figured it out.

        the firewall configuration above is accurate, HOWEVER one small change. Instead of www.whatever.com I needed to create an alias for www.whatever.com, which is good because it offers me the opportunity to add not only one site, but the sites entire dns pool.

        I executed

        host www.whatismyip.com

        received three IP addresses. I shoved em all into a firewall alias, shoved the alias into a firewall rule, and VOILA! Problem solved :D

        1 Reply Last reply Reply Quote 0
        • K
          kpa
          last edited by

          That works but if the DNS record for www.whatever.com ever changes you'll have to update your alias manually.

          1 Reply Last reply Reply Quote 0
          • S
            SuperK
            last edited by

            thats true. is there a package to notify me of such a change? or a shell script?

            1 Reply Last reply Reply Quote 0
            • J
              jonnytabpni
              last edited by

              You could write one yourself. If it were me, I'd use php CLI and use a simple condition. Then, php could email you if a change was found. I would write you an example, but I'm on my iPhone…

              1 Reply Last reply Reply Quote 0
              • S
                sunny
                last edited by

                jonny, do you mind sharing the script with me as well?

                Thanks

                1 Reply Last reply Reply Quote 0
                • J
                  jonnytabpni
                  last edited by

                  Hey folks!

                  I'll gladly write yous up a script but it would be great if you could give me a few days as I'm just busy with work.

                  Cheers

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