Subject: static route via address/squid
To: None <netbsd-users@netbsd.org>
From: Zafer Aydogan <zafer@gmx.org>
List: netbsd-users
Date: 12/03/2004 15:58:09
Hello Mailing-List,
I have a router with 2 network interface, with a transparent Proxy on it.
The Router can access both networks 192.168.0.0/24 and 192.168.254.0/24.
The Router has a default gateway which points to 192.168.254.254
But the Proxy (squid) on the same machine should use our second gateway =
192.168.0.22 which is a host in the 192.168.0.0/24 network.
The Rule for that in squid.conf is
tcp_outgoing_address 192.168.0.22
Unfortunately this dosn't work, because .0.22 isn't an interface on the
router but a host in the same network, I think.
I get following Error Message:
While trying to retrieve the URL: http://www.netbsd.org/
The following error was encountered:
Socket Failure
The system returned:
(49) Can't assign requested address
Squid is unable to create a TCP socket, presumably due to excessive load.
Please retry your request.
Your cache administrator is zafer@proxy.sst.net.
While it works fine with
tcp_outgoing_address 192.168.254.254
Though,
I could add another alias ip on the router.
#ifconfig 192.168.0.25 alias
so that Squid can see the ip --
but how can I set 192.168.0.25 as a route to 192.168.0.22 which is on the
same network, and directly reachable,
or in other words, how can I bring Squid to use 0.22 as a gateway but the
router (which is himself a gateway) 254.254
Any Ideas ?
Thanks in advance.