Quote:
Originally Posted by soumalya
can u pls tell me how to write the extensions in bad-extensions.txt in ur 3rd solution.
|
IIRC, just put one expression per line in the file, like:
Code:
\.exe$
\.mp3$
\.rar$
\.zip$
\.doc$
Quote:
how to do same think more than one or all ip ?
|
To affect only specific IPs, you can use an ACL for each, like:
Code:
acl bandwidth_hog1 src 192.168.1.104
acl bandwidth_hog2 src 192.168.1.111
acl bandwidth_hog3 src 192.168.1.159
acl bad_extensions urlpath_regex -i \.exe$ \.mp3$ \.rar$ \.zip$ \.doc$
http_access deny bandwidth_hog1 bad_extensions
http_access deny bandwidth_hog2 bad_extensions
http_access deny bandwidth_hog3 bad_extensions
Or you can specify a range of IPs instead, like:
Code:
acl bandwidth_hogs src 192.168.1.110-192.168.1.166
acl bad_extensions urlpath_regex -i \.exe$ \.mp3$ \.rar$ \.zip$ \.doc$
http_access deny bandwidth_hogs bad_extensions
To affect everyone, use the "all" ACL, which should exist by default:
Code:
acl bad_extensions urlpath_regex -i \.exe$ \.mp3$ \.rar$ \.zip$ \.doc$
http_access deny all bad_extensions