0

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

Alex
  • 197
  • 3
  • 5
  • 10

1 Answers1

1

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
Sergey P. aka azure
  • 1,516
  • 1
  • 11
  • 12
  • 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:[email protected]:3128' elinks` OR `export http_proxy='http://username:[email protected]: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