LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Restrict acces to yahoo.com and all subdomains in elinks using squid (https://www.linuxquestions.org/questions/linux-newbie-8/restrict-acces-to-yahoo-com-and-all-subdomains-in-elinks-using-squid-4175441983/)

alex_matt 12-18-2012 10:21 AM

Restrict acces to yahoo.com and all subdomains in elinks using squid
 
Hi I am new in linux and i don't know how to do this. If anybody can help me. Thanks

mandyapenguin 12-18-2012 10:45 AM

Do you mean blocking yahoo.com to the client PCs?
In squid proxy server add the entry in /etc/squid/squid.conf file as below
Code:

acl blocked_sites dstdomain "/etc/squid/.blocked_sites"
http_access deny blocked_sites

Now add the sites whichever you need in .blocked_sites file, the acl name, file path and file name can be anything as you wish. But make sure to change the entries in /etc/squid/squid.conf file according to your changes.
Code:

vi /etc/squid/.blocked_sites
.yahoo.com
.othersite.com
.someothersites.come

save the file and reload the squid service
Code:

service squid reload
It blocks not only elinks but also block other CLI & GUI browsers.

alex_matt 12-18-2012 04:12 PM

Only in elinks
 
And if i want to block them only in elinks what i need to do.

mandyapenguin 12-19-2012 08:26 AM

Quote:

Originally Posted by alex_matt (Post 4852229)
And if i want to block them only in elinks what i need to do.

Could you explain the purpose that you need to block only elinks?


All times are GMT -5. The time now is 10:37 AM.