Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Squid and I want to know how to make a specific IP range of allowed connections, I use this

acl permittedips src 77.86.72.49

http_access allow permittedips

But I want to make an range that allows from 70.*.*.* to 90.*.*.*. How can I do this the easiest way?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You can use CIDR notation to signify this in the ACL for squid. You would want:

acl permittedips src 70.0.0.0/8
acl permittedips src 90.0.0.0/8

More information on CIDR:

http://en.wikipedia.org/wiki/CIDR_notation

share|improve this answer
    
This doesn't seem to work? My IP is 86.132.x.x and I can't connect to squid, it works if I put my oringinal IP address, but I want to specify the range BETWEEN 70.*.*.* to 90.*.*.*. –  Burning the Codeigniter Aug 26 '11 at 18:11
    
Oh, I missed the 'to' part. You really can't do that easily with CIDR, you'd be best off adding 20 rows one for 70, 71, 72...89, 90. –  polynomial Aug 26 '11 at 20:32
    
Hmm, didn't work. When I restart squid, it tells me start: Job failed to start. On service squid start. –  Burning the Codeigniter Aug 26 '11 at 20:50
    
You probably need to give different names to each block, like permittedips70, permittedips71 –  polynomial Aug 26 '11 at 21:19
    
@polynomial No, it is possible to use same acl name for multiple lines. He should look into squid cache.log for errors. –  AlexD Aug 29 '11 at 5:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.