Re: [squid-users] Configuring tcp_outgoing_address for Squid with 2 internet connections when 1 connection uses dhcp to get the IP address

From: Kevin <[email protected]>
Date: Mon, 14 Feb 2005 06:35:03 -0600

On Mon, 14 Feb 2005 16:20:38 +0530, Siju George <sgeorge.ml@gmail.com> wrote:
> I am nearing completion of the configuration of the OpenBSD Gateway
> with two internet connections.
>
> So there is a problem with squid.
>
> The task is to configure a set of users "dsl_users" alone use the DSL
> connection to connect to websites and force all others use the cable
> modem connection. The file "/etc/squid.conf" gives the following
> instructions for that.
>
> but the problem is that though I have the IP of the DSL connection
> fixed I get a differrent IP each time I reboot for cable connection.
> So how do I configure this?

Use the NAT functionality of OpenBSD's "pf" embedded packet filter
to rewrite a private source IP address to the interface IP on the DSL
circuit?

Inside pf, the NAT settings can track the dynamic interface IP address,
like this:
    nat on $dsl_if from $int_net to any -> ($dsl_if)

> Since I am not able to give the IP address for the last
> "tcp_outgoing_address" squid shows error and doesnot start up.
>
> Could someone provide an Idea of how to solve the problem ???

Personally, I just comment out tcp_outgoing_address and let the routing
table determine what gateway squid traffic uses to get to the Internet,
and let 'pf' decide how to NAT those connections.

IIRC, you could set tcp_outgoing_address to bind the outgoing address
to a specific inside interface RFC1918 alias IP address, then force
traffic sourced from that specific address to go out via the dsl interface
through route-to statements. I don't have an example of this, as I'm not
doing this type of source-based routing at this time.

Kevin Kadow
Received on Mon Feb 14 2005 - 05:35:04 MST

This archive was generated by hypermail pre-2.1.9 : Tue Mar 01 2005 - 12:00:02 MST