Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Restricting access to sites

I need to restrict the access to yahoo.com and fr.yahoo.com in elinks using squid. Can everyoane help me

share|improve this question
add comment

marked as duplicate by qbi, hhlp, Jorge Castro, fossfreedom Dec 18 '12 at 19:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

Two steps are required: 1) set up elinks to use proxy. You can do this by either exporting http_proxy env variable.

Ex.: export http_proxy='http://[user[:password]@]your.proxy.server.com:8080'

Other way - is to configure elinks to use your proxy server.

2) configure squid to to block requests to yahoo.com and fr.yahoo.com. Ex.:

squid.conf:

acl blocked_yahoo dstdomain yahoo.com
acl blocked_yahoo dstdomain fr.yahoo.com
#or you can have rule for all subdomains:
#acl blocked_yahoo dstdomain .yahoo.com
http_access deny blocked_yahoo
share|improve this answer
1  
Could you be more explicit with first step. Sorry but i am new with linux –  Alex Dec 18 '12 at 16:10
    
There's environmental variables that can be used by programs. One good example is env var LANG which is used by programs to determine which translation to use. Same with http_proxy env var. So just run elinks with the following command: http_proxy='http://username:password@your.proxy.server.com:3128' elinks OR export http_proxy='http://username:password@your.proxy.server.com:3128 and then run elinks from this console. Or add export http_proxy=.. to your ~/.bashrc Other way is to run elinks and go to options manager -> protocols -> HTTP -> Proxy configuration and set proxy settings –  Sergey P. aka azure Dec 18 '12 at 19:00
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.