Take the 2-minute tour ×
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 have a machine with Linux Slackware 13.37. Is it possible to configure iptables, so the users will be able to access web only through squid? The direct access through the browser will be blocked.

Cause I don't want them to visit certain sites.

share|improve this question

1 Answer 1

Yes, but you will need to setup a white list of allowed connection,

Set default out going policy to drop, and only allow access to a specific port / server, i.e

iptables -P OUTPUT DROP
iptables -A OUTPUT -p tcp --dport XX -d YY -j ACCEPT
... ( your other rules )

That way user must configure their browser to utilize YY:XX as the proxy server.

share|improve this answer
    
What to do when squid and browser reside on the same machine? –  user4035 Mar 5 '13 at 14:28

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.