Re: ReRe: Question on ACLs

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 27 Oct 1998 21:43:09 +0100

Jens-s. Voeckler wrote:

> Now, I would like to handle those requests as if they were !.com,
> but "dstdomain" and "dstdom_regex" all feature a reverse lookup.
> But I don't want that feature, I need the old behaviour.

url_regexp does not do a reverse lookup on a IP address.

acl COM url_regex -i ^([^:]*://)?[^/]*\.com(:[0-9]*)?(/|$)

Explanation:
([^:]*://)? http:// style prefix, or blank.
[^/]* login and domain name prefix
\.com .com
(:[0-9]*)? any :81 suffix, or blank
(/|$) / after host[:port], or end of URL.

If you want to match numeric hosts then replace .com with
[0-9][0-9]* domain name ending in digits

If you want to manually test a regexp ACL then use egrep
(squid uses extended regular expressions)

---
Henrik Nordstrom
Spare time Squid hacker
Received on Tue Oct 27 1998 - 15:03:23 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:49 MST