acl noporn url_regex -i sex
Do not forget to run the kill -SIGHUP command each time you make
changes to Squid; otherwise, it does not reread your changes
You can have Squid check your configuration files for errors by running
squid -k parse as root. If you see no errors, it means your
configuration is fine.
NOTE
It is critical that you run the command kill -SIGHUP and provide it the
PID of your Squid daemon each time you change the configuration; without
this, Squid does not reread its configuration files.
Specifying Client IP Addresses
The configuration options so far have been basic, and you can use many more
options to enhance the proxying system as you like.
After you have decided which rules work for you locally, it is time to spread
them out to other machines. You do so by specifying IP ranges that should be
allowed or disallowed access, and you enter them into Squid by using more
ACL lines.
If you want to, you can specify all the IP addresses on your network, one per
line. However, for networks of more than about 20 people or using Dynamic
Host Control Protocol (DHCP), that is more work than necessary. A better
solution is to use classless interdomain routing (CIDR) notation, which
enables you to specify addresses like this:
Click here to view code image
192.0.0.0/8
192.168.0.0/16
192.168.0.0/24
Each line has an IP address, followed by a slash and then a number. That last
number defines the range of addresses you want covered and refers to the
number of bits in an IP address. An IP address is a 32-bit number, typically
presented in dotted-quad notation: A.B.C.D. Each of those quads can be
between 0 and 255 (although in practice some of them are reserved for special
purposes), and each is stored as an 8-bit number.
The first line in the previous code covers IP addresses starting from 192.0.0.0;
the /8 part means that the first 8 bits (the first quad, 192) is fixed and the rest
is flexible. So, Squid treats that as addresses 192.0.0.0, 192.0.0.1, through to