Redirect all traffic from the router to the proxy server

I don't know if the question is related to stackoverflow themes, so if not sorry in advance.

I have the following problem that I am trying to solve:
 I am connected to my university network, which requires me to configure my browser to use a proxy. I want to configure a router in my home (D-Link Dir-300 with firmware: DD-WRT v24-sp2) and because I use several Android devices that are not implemented (I can not use global proxy applications) I was thinking next solution:
  QuestionCan I make my router redirect all traffic from my wireless network to the proxy server that I use (letting devices not configure the proxy server)?

I have an HTTP redirect tool available on the router configuration page HTTP Redirect
I searched for the destination IP address from the proxy server URL that I used, and I get 4 IP addresses for this node, I tried to use two of them with the source network installed in 192.168.1.0, but this is not so, the t-modem browser on Android devices does not work without setting up a proxy server.

____________________________________ EDIT ____________________________
After looking a few more, I found a link

#!/bin/sh
PROXY_IP=[IP]
PROXY_PORT=[PORT]
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_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT
iptables -t nat -A POSTROUTING -o br0 -s $PROXY_IP -p tcp -d $LAN_NET -j SNAT --to $PROXY_IP
iptables -A FORWARD -i vlan1 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT

How can I change it to redirect all udp / tcp etc traffic coming from all ports?

+4
source share
1

- - Android. -, Android , 2.3. iOS Wi-Fi.

( ), /. IP- /, IP- . - (, - charles) -. -, - ( + 8080).

+1

All Articles