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

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?


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

acl permittedips src
acl permittedips src

More information on CIDR:


  • 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.*.*.*. – MacMac 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. – MacMac 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
  • 1
    @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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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