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

    Squid with Lan1 > Wan1, Lan 2 > Wan2

    Scheduled Pinned Locked Moved Routing and Multi WAN
    18 Posts 4 Posters 6.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.
    • C Offline
      coemgen29
      last edited by

      My Wan1 interface ip is : 10.0.0.100 (default gateway)
      My Wan2 interface ip is : 192.168.1.100

      Even if i just set "tcp_outgoing_address 192.168.1.100;", squid use default gateway only (10.0.0.100).

      There is maybe a outgoing rule to add?

      1 Reply Last reply Reply Quote 0
      • C Offline
        coemgen29
        last edited by

        Nobody has an idea to make policy routing with Squid?  :-[

        1 Reply Last reply Reply Quote 0
        • R Offline
          rubic
          last edited by

          Just tested on 2.1.1-PRERELEASE/Squid 2.7.9. It's working.
          Uncheck 'Disable X-Forward' and 'Disable VIA' on 'Proxy server: General settings', then open http://all-nettools.com/toolbox/proxy-test.php to make sure traffic not bypass squid for some reason.
          The result must be: "Proxy server detected", "You came from…", "You came via..."

          1 Reply Last reply Reply Quote 0
          • C Offline
            coemgen29
            last edited by

            @rubic:

            Just tested on 2.1.1-PRERELEASE/Squid 2.7.9. It's working.
            Uncheck 'Disable X-Forward' and 'Disable VIA' on 'Proxy server: General settings', then open http://all-nettools.com/toolbox/proxy-test.php to make sure traffic not bypass squid for some reason.
            The result must be: "Proxy server detected", "You came from…", "You came via..."

            "Disable X-Forward" and "Disable VIA" are already unchecked (default). Obviously it's don't work.

            Here is the results :

            You came from 172.16.0.2(172.16.0.2)
            You came via 1.1 xxxx:3128 (squid/2.7.STABLE9)
            Remote address 82.x.x.x.x (WAN1 Public IP)
            Remote host 82.x.x.x (WAN1 Public IP)

            Remote addresses should be 109.x.x.x (WAN2 Public IP)

            1 Reply Last reply Reply Quote 0
            • R Offline
              rubic
              last edited by

              @coemgen29:

              My Wan1 interface ip is : 10.0.0.100 (default gateway)
              My Wan2 interface ip is : 192.168.1.100

              The problem may be that you have the same ip subnet on different interfaces (WAN2, LAN1). Do you?

              1 Reply Last reply Reply Quote 0
              • C Offline
                coemgen29
                last edited by

                @rubic:

                @coemgen29:

                My Wan1 interface ip is : 10.0.0.100 (default gateway)
                My Wan2 interface ip is : 192.168.1.100

                The problem may be that you have the same ip subnet on different interfaces (WAN2, LAN1). Do you?

                In fact, My LAN1 subnet is : 192.168.100.0/24, i put 192.168.1.0 in the scheme for example,
                my apologies!

                So i have :
                WAN1 : 10.0.0.100
                WAN2 : 192.168.1.100
                LAN1 : 192.168.100.1/24
                LAN2 : 172.16.0.1/16

                Gateways :
                GW1 : 10.0.0.200 (default)
                GW2 : 192.168.1.200

                Squid custom options :
                acl LAN1 src 192.168.100.0/24;
                acl LAN2 src 172.16.0.0/16;
                tcp_outgoing_address 10.0.0.100 LAN1;
                tcp_outgoing_address 192.168.1.100 LAN2;

                "Disable X-Forward" and "Disable VIA" unchecked

                If i do a tracert, everything is ok, LAN2 go out via WAN2.
                If i check my public ip from LAN2 via website, it shows the WAN1 public IP instead of the WAN2.

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rubic
                  last edited by

                  Sorry, I ran out of ideas. It just must be working. If you will share your config backup (with all the sensitive data deleted), I'll try to help you.

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    coemgen29
                    last edited by

                    Ok, i will go back to Factory defaults, note what i setup and then send my config file (if it does not work!)
                    Thanks for ur help anyway

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      coemgen29
                      last edited by

                      Well, i made a factory reset and discovered my problem: i had a static route in 192.168.0.0/16 to a VPN Gateway. (so wan2 was in this static route! 192.168.1.100/24).

                      Deleted this static route and now, everything works like a charm  :)
                      Thanks for your help

                      Topic SOLVED

                      1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User
                        last edited by

                        how could i work around the problem, that my wan-ip changes every 24h?

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