Bekijk de volledige versie : redirect traffic to other server with squid
Hi,
I use wl500g as normal access point and have some extra router for internet access. Now I like to redirect all clients which are connected via wlan to to a linux server with squid in the same network. This can be done by redirect ports. Does anyboday can tell me how to do this or give me some nice links how it can be done?
192.168.1.1 is linux server, .100 is ap, .254 is internet router
ALBI...
Hi,
I use wl500g as normal access point and have some extra router for internet access. Now I like to redirect all clients which are connected via wlan to to a linux server with squid in the same network. This can be done by redirect ports. Does anyboday can tell me how to do this or give me some nice links how it can be done?
192.168.1.1 is linux server, .100 is ap, .254 is internet router
ALBI...
Can anybody help?
Use google search for iptables and redirect.
Use google search for iptables and redirect.
Ok sorry, thats no problem. I will find the correct iptables line, my problem is more, between which interfaces do I have to set iptables?
Is this correct:
eth2 is WLAN
eth0 is lan, but I have br0 with ip address on it. So will I have to use br0 or eth0 as outgoing interface?
eth1 is wan port, but I use AP mode, so I connect via LAN to Internet, I have some extra gateway.
Thanks for any help.
If you use wl500g in the AP mode, then you will not be able to redirect this way. You need to adjust your gateway instead.
If you use wl500g in the AP mode, then you will not be able to redirect this way. You need to adjust your gateway instead.
Bad, ok no problem to switch to Router mode, can do it then?
I can connect my internet gateway then to wan port if needed.
Why is it not possible in AP mode? Cant I use eth2 as input device for redirect?
I tried this, but did not work yet:
iptables -A PREROUTING -t nat -i eth2 -p tcp --dport http -j REDIRECT -d 192.168.1.1 --to-port 3128
192.168.1.1 is my squid proxy.