Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have installed elinks and squid and I need to restrict access to subdomains. for example, How do I permanently configure elinks(or squid) to forbid access to

share|improve this question

1 Answer 1

Using Squid

First create a file name acl.txt and put it under /home/ or /etc/ and put inside it (.will include sub domains )

After that Put this configuration line under squid.conf

I assume you put acl.txt under /etc/squid/

acl denyThis dstdomain "/etc/squid/acl.txt" 
http_access deny denyThis 
http_access allow all 
acl our_networks src
http_access allow our_networks

By this lines we allow all requests from any ip that belong to network with mask except requests that have a destination domain contains is file /etc/squid/acl.txt.

Check Squid Configuration Basics For more knowledge :)

share|improve this answer
I tried to access from elinks and it worked. Do I have to somehow connect elinks with squid? – johnny Dec 8 '11 at 19:49
@johnny I don't think you can block elinks and Tor using squid. – Achu Dec 9 '11 at 5:18

Your Answer


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.