You are not logged in.

#1 2009-04-03 07:56:30

stryder
Member
Registered: 2009-02-28
Posts: 500

[solved] setting lan to use external proxy server

I have an arch install that is my lan's gateway to the internet - it connects via an adsl modem. Computers on the lan just use that computer as gateway to the internet. Sometimes my ISP has problems with international links and I recently found that using an external proxy, ie a free proxy on the net, can speed things up significantly when that happens. The problem is that I will have to configure the browsers on my lan to use the proxy and reconfigure when I don't need the proxy any more as international links return to normal. Is there an easy way to set this on the gateway computer so that every browser on the lan would not need to be configured every time?

Last edited by stryder (2009-04-03 09:56:23)

Offline

#2 2009-04-03 09:25:14

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: [solved] setting lan to use external proxy server

I think this piece of iptables "code" run on your gateway should help you:

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to proxy-box:3128

Replace eth1 with the interface facing your LAN.

I think you need to read a manual for transparent proxy configuration for further information.

!WARNING!: Using an external free proxy is not secure. Your data transferred through the proxy may be traced, logged, spied on, etc.

Last edited by ckristi (2009-04-03 09:26:58)


In love I believe and in Linux I trust

Offline

#3 2009-04-03 09:55:58

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [solved] setting lan to use external proxy server

Thanks ckristi. It works!

I use shorewall to configure iptables. I probably need to read up on that. Or would that iptables command you provided merely add to whatever else shorewall has configured?

I understand that external free proxies are insecure but for now the speed difference (about 10x) cannot be ignored.

Offline

#4 2009-04-03 11:08:35

ckristi
Member
From: Bucharest, Romania
Registered: 2006-11-21
Posts: 225

Re: [solved] setting lan to use external proxy server

Yes, you can just add it to your shorewall generated script and it should work.


In love I believe and in Linux I trust

Offline

Board footer

Powered by FluxBB