Re: [squid-users] Selecting source port on squid's requests

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 18 Dec 2002 01:52:06 +0100

On Wednesday 18 December 2002 00.30, Andrei Boros wrote:
> > By first having someone implement the feature for you. Today
> > Squid fully relies on the OS to assign suitable ports when making
> > the connection.
>
> Oh. Well, unless I find another way to do it, this being a last
> resort, I'd still try to do it myself first. Maybe I manage (?)

Probably with a litte guidance if you have done some small amount of C
program study..

> Assuming this, how can I couple an acl with tcp_outgoing_address?
> I've seen the acl name myip, but AFAIK this refers to the ip
> defined by http_port to which the client connected...

By the tcp_outgoing_address directive. (squid-2.5 and later only).

> Still, the issue remains when having to control 2 different classes
> of traffic going out the same isp.

Not really. Just use one IP address per class identifier and NAT
suitable in your gateway.

> > You should also be able to use ToS for the job. Does not require
> > multiple IP addresses on the proxy.
>
> Then I must definitely upgrade my 2.3 to 2.5. Yes, thank you, this
> is an excellent idea.
> acl name_x tos tos_value
> right?

There is a new directive for ToS on outgoing connections.

Note that the use of ToS is somewhat limited. ToS will be set on
packets sent by Squid, but in most cases the return traffic from the
origin server will not have ToS set. But it is good enought for NAT
address selection etc in iptables or other stateful NAT engines who
can read the ToS/DS value.

Regards
Henrik
Received on Tue Dec 17 2002 - 17:58:51 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:12:07 MST