Configure HTTP redirect to external proxy

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
RPR84
DD-WRT Novice


Joined: 17 Nov 2012
Posts: 3

PostPosted: Sat Nov 17, 2012 14:43    Post subject: Configure HTTP redirect to external proxy Reply with quote
I want to configure my Linksys E4200 with DD-WRT firmware that all traffic on port 80 (HTTP) will redirected to an external proxy server. I found topics how I can configure redirect HTTP traffic to internal proxy servers, but not what script I can use to forward it to external proxy servers.

On one topic, I found following script:

#!/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

I hope, somewhere can help me with this. Thanks!
Sponsor
RPR84
DD-WRT Novice


Joined: 17 Nov 2012
Posts: 3

PostPosted: Sat Nov 17, 2012 15:35    Post subject: Reply with quote
I try to fill in the IP-address of the external proxy server in the option "HTTP Redirect" below option "Hotspot". First it didn't work. But now it works fine!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum