4

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

1 Answer 1

3

Using Squid

First create a file name acl.txt and put it under /home/ or /etc/ and put .yahoo.com 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 192.168.1.0/24
http_access allow our_networks

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

Check Squid Configuration Basics For more knowledge :)

2
  • I tried to access yahoo.com from elinks and it worked. Do I have to somehow connect elinks with squid?
    – johnny
    Dec 8, 2011 at 19:49
  • @johnny I don't think you can block elinks and Tor using squid.
    – Achu
    Dec 9, 2011 at 5:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .