Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to restrict access to yahoo.com and all its subdomains in elinks. I must use squid but I don't know how to configure it. Can anybody help me because I am new to Linux.

share|improve this question
1  
What have you tried so far? What isn't working? Are there any error messages? – Chris Down Dec 20 '12 at 11:56
A very similar question on AskUbuntu: "Why do I get “Host not found” when using a restricted Squid proxy in Elinks?". Are you cross-posting? – gertvdijk Dec 20 '12 at 11:59
squid.conf: acl blocked_yahoo dstdomain .yahoo.com http_access deny blocked_yahoo – Alex Dec 20 '12 at 12:00
alex, i have updated my answer so please check it now.. my side it's working as expected. – Rahul Patil Dec 20 '12 at 12:33
Yes, posted on multiple stack exchange sites. – EightBitTony Dec 20 '12 at 14:59

1 Answer

You can use

acl my_network src 192.168.0.0/16       # RFC1918 possible internal network
acl block_yahoo dstdomain .yahoo.com
http_access deny my_network block_yahoo
http_access allow my_network
http_access deny all

after adding above lines in '/etc/squid/squid.conf' just run below command to reload squid configuration

squid -k reconfigure

refer this link for more info

share|improve this answer

Your Answer

 
discard

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.