开发者

How to block all connection in squid

How do I block all connections from clients to any website?

开发者_如何学Go

I have had the client computers to use my linux machine with squid installed as a proxy server. I am new to squid and I have installed it in my linux box. I wanted to see if it is really working. How should I configure squid.conf to block all client request to the proxy. If I could make this work then I'll proceed to my next move which is to limit the bandwidth for each client computers.

Please help me.


Add this to squid.conf:

http_access deny all

Then restart squid (or just squid -k reconfigure).


Incase you want to test your proxy server by limiting client access, but allowing access to connections from localhost or your testing machine these acls should work after you change the addresses to suit your network

acl localhost src 127.0.0.1/32
acl allowedhost src 10.0.0.7/255.0.0.0
acl localnet src 10.0.0.0/8

http_access allow localhost
http_access allow allowedhost
http_access deny localnet
http_access deny all

Change the http_access deny localnet to http_access allow localnet once you are done with testing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜