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

    Using rules to redirect to transparent proxy

    NAT
    3
    3
    13.4k
    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.
    • G
      gi7
      last edited by

      i dont know, in which group this

      i have pfsense

      IP
      |
      pfsense
      |
      192.168.1.1
      |
      squid box, 192.168.1.2

      how to write a rules, i just want redirect all 80port (except 192.168.1.2) to 3128 on squid box
      on squid box, i have support for transparent proxy

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

        Create a portforward at interface LAN, external adress any, protocol tcp, external port 80, nat IP <squid ip="">internal port 3128.</squid>

        1 Reply Last reply Reply Quote 0
        • R
          rsw686
          last edited by

          This will only work if squid is on a different interface. At least many months ago I couldn't get it to work with a redirect rule with squid on the same interface. Mostly due to not being able to add a rule thats like below

          rdr on {iface} inet proto tcp from !{squid ip} to any port = 80 -> {squid ip} port 3128

          Three options:

          1. Place squid box on different interface on the pfSense box and make the redirectrule.
          2. Set squid box up with a bridge and redirect traffic going through the bridge to squid.
          3. Change the pfsense dhcp lease default gateway to squid box and set the squid box gateway pointing to the pfsense box with traffic being redirected to squid.
          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.