Heya!,
In my dorm on university campus, we can pick up the Universities wireless signal but it is weak and so does not propagate to all the rooms. As such, we have been using an old wag54g running in client mode to pick up the wireless and run our own subnet in the dorm.
The university uses a proxy and we have configured firefox on our client machines to use this quite successfully. The outline of the current network set-up is shown the diagram attached below.
We were hoping to remove some of the hassle of having to enter in the firefox proxy details everytime we bring our laptop back to the dorm network by having the wag54g keep the proxy settings instead.
However, Im having a bit of difficulty setting up my Wag54g to do this. After a bit of research, I saw two methods for implementing this. One was using the "Http Redirect" setting.
http://www.dd-wrt.com/wiki/index.php/HTTPRedirect. I clicked enable, entered in the proxy IP address and port num, and entered in 192.168.2.0 for the IP source. This did not work. So we tried setting up a transparent proxy using iptables and this guide here:
http://www.dd-wrt.com/wiki/index.php...nsparent_Proxy … rent_Proxy under the "Proxy Server on the LAN Subnet" guide.
Code:
#!/bin/sh
PROXY_IP=172.16.**.**
PROXY_PORT=8080
LAN_IP=`nvram get lan_ipaddr`
LAN_NET=$LAN_IP/`nvram get lan_netmask`
iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d $LAN_NET -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i br0 -s ! $PROXY_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT
iptables -t nat -I POSTROUTING -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -j SNAT --to $LAN_IP
iptables -I FORWARD -i br0 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT
However, this did not work either, probably because the proxy is on the university side of the wag54g. Also, we have our router in client mode (i.e, the wirless connection is the WAN), would this affect this?
There is a guide there for using an "Proxy Server on Different Network and Using Chillispot", however, we dont use Chillispot, so this would be no good to us.
Could anyone point us in the right direction as to how we might go about this?
Thanks!
iwconfig:
Code:
br0 Link encap:Ethernet HWaddr 00:99:4C:99:00:01
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4810780 errors:0 dropped:0 overruns:0 frame:0
TX packets:7635880 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:342226097 (326.3 MiB) TX bytes:1952020360 (1.8 GiB)
br0:0 Link encap:Ethernet HWaddr 00:99:4C:99:00:01
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr 00:99:4C:99:00:01
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4810845 errors:0 dropped:0 overruns:0 frame:0
TX packets:7635873 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:448064534 (427.3 MiB) TX bytes:2013483413 (1.8 GiB)
Interrupt:4
eth1 Link encap:Ethernet HWaddr 00:99:4C:99:00:DE
inet addr:10.9.***.87 Bcast:10.9.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7513683 errors:0 dropped:0 overruns:0 frame:12378202
TX packets:4699844 errors:631 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1925433979 (1.7 GiB) TX bytes:430976081 (411.0 MiB)
Interrupt:2 Base address:0x5000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1
RX packets:171 errors:0 dropped:0 overruns:0 frame:0
TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11556 (11.2 KiB) TX bytes:11556 (11.2 KiB)
vlan0 Link encap:Ethernet HWaddr 00:909:4C:99:00:01
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:4810792 errors:0 dropped:0 overruns:0 frame:0
TX packets:7635877 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:361471393 (344.7 MiB) TX bytes:1982563106 (1.8 GiB)
vlan1 Link encap:Ethernet HWaddr 00:99:4C:99:00:01
UP BROADCAST RUNNING PROMISC ALLMULTI MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
iptables -t nat -L
Code:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere 10.9.129.87 tcp dpt:telnet to:192.168.2.1:23
DNAT icmp -- anywhere 10.9.129.87 to:192.168.2.1
TRIGGER 0 -- anywhere 10.9.129.87 TRIGGER type:dnat match:0 relate:0
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT 0 -- anywhere anywhere to:10.9.129.87
RETURN 0 -- anywhere anywhere PKTTYPE = broadcast
MASQUERADE 0 -- 192.168.2.0/24 192.168.2.0/24
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
http://www.dd-wrt.com/phpBB2/files/u...ection_143.png