-   Linux - Networking (
-   -   Squid+2 Networks+2 Gateways+same Machine?! (

pin_bk 08-19-2005 01:39 PM

Squid+2 Networks+2 Gateways+same Machine?!
I have a Squid BOX with two networks - &,

and for each network a lan card which represent their gateways.

How can these two seperate networks use the same squid and share the cache, but have different connections to the internet?

All The Best

peter_robb 08-19-2005 07:01 PM

Have a read of the
Chapters 4 & 5 detail how to split the traffic depending on it's source address

pin_bk 08-26-2005 08:27 PM

In that howto I found help, and by making these rules:


echo 200 T10 >> /etc/iproute2/rt_tables
echo 201 T20 >> /etc/iproute2/rt_tables
ip route add dev eth0 src table T10
ip route add dev eth1 src table T20
ip route add default via table T10
ip route add default via table T20
ip route add dev eth0 src
ip route add dev eth1 src
ip rule add from table T10
ip rule add from table T20
ip route flush cache

I get nothing........and If I want to have internet at all I must add a default GW using this command:


ip route add default via


ip route add default via
What now?

It simply uses only the default gateway, I use SuSE 9.3 Linux

pin_bk 08-27-2005 12:23 PM

The diagram:


- eth0 -
- eth1 -

Linux Router:
- eth0 - (256kbit)
- eth2 - (256kbit)
- ETH1 - 80.65.X.X (512kbit) - PUBLIC IP ADDRESS

pin_bk 08-27-2005 01:21 PM

On The Linux router, when I shutdown

# ifdown eth0

My Pc, and the network doesnt stop losing internet, but the network does. In this case this routing rules work, but when both of the interfaces are up ( & the internet for the network goes over


pin_bk 08-29-2005 06:50 AM

Surfing I read that I should delete in this case, the main table, so I did and the routing rules now work.......but on the machine itself the internet is not present so the proxy does not work.....I cannot ping anything (in the shell on squid box), which is logical cuz the main table and the default route were deleted......What now? :)

So other protocols except the HTTP work....

p.s. updated version of the HOWRO:

pin_bk 09-03-2005 03:22 PM

By the Time I spent on this problem I think that it actually is a matter of squid, because in this case it uses only the default gateway that's in the main table and dows not care for other static routes/table routing rules.

Well I will have to use two squid boxes and get thme to work together...

All times are GMT -5. The time now is 07:52 PM.