Mailing List Archive

Problems using subnets in acl
Hi

I am testing varnish, and I need to allow our internal development
net to purge documents.

It works perfectly if i add single ip's, but when i try to add
subnets it won't work, is this a bug, or am i writing something wrong
in vcl ?

acl purge {
"localhost";
"10.10.0.0/16";
}

sub vcl_recv {
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup;
}
}

I have also tried "10.10.0.0/255.255.0.0";

Any ideas ?


Venlig hilsen

Henrik Nicolaisen
TV 2 Interaktiv


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1931 bytes
Desc: not available
Url : http://projects.linpro.no/pipermail/varnish-misc/attachments/20061106/dac76ba4/attachment.bin
Problems using subnets in acl [ In reply to ]
Henrik Nicolaisen <hema at tv2.dk> writes:
> acl purge {
> "localhost";
> "10.10.0.0/16";
> }

The correct syntax is "10.10.0.0"/16 (i.e. keep the mask length
outside the quotes).

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Problems using subnets in acl [ In reply to ]
In message <90C76C61-FCAF-4B27-9C45-0DDB0D28398E at tv2.dk>, Henrik Nicolaisen wri
tes:

>It works perfectly if i add single ip's, but when i try to add
>subnets it won't work, is this a bug, or am i writing something wrong
>in vcl ?
>
>acl purge {
> "localhost";
> "10.10.0.0/16";
>}

Hmm, that should work, it's probably a bug.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.