LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Forcing users to use proxy (https://www.linuxquestions.org/questions/linux-networking-3/forcing-users-to-use-proxy-519122/)

avallach 01-14-2007 04:19 AM

Forcing users to use proxy
 
Hello.
I've got one machine in a local network. I've squid installed on this computer and dansguardian. I don't have access to router.
And my question:
Is there a way to force users to use proxy on this host? For example some redirection with iptables ?
I didn't manage to create a proper chain, is it possible ?

jschiwal 01-14-2007 05:06 AM

I don't understand what you mean by you don't have access to the router. Is the host running squid and dansquardian situated physically between the lan and the router? If so, then other hosts have to use the proxy because there is no other way to access the internet.

avallach 01-14-2007 05:10 AM

I just a single computer connected to the net and I want to use dansguardian on it, the proxy installed on this machine is only for this machine not to serve other computers...
A lot of people use that computer, so when I have default configuration of squid, I need to set proxy in the web browser to work. I want it to work for default, without possibility to change. I figured out that I can somehow change the settings of iptables, but I don' know how..

OK found it:
Code:

iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT  --to 3128 (port my proxy works) -o lo (it needs the correct interface also)


All times are GMT -5. The time now is 12:04 PM.