Proxy on Production Net (WAN)

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


Joined: 07 Mar 2014
Posts: 1

PostPosted: Fri Mar 07, 2014 10:13    Post subject: Proxy on Production Net (WAN) Reply with quote
Hello,

My case is simple:

I use DD-WRT on an Hyper-V for my test labs.
The company I work for use a proxy (as it is the case for many companies).

My test network is 10.0.0.0 and the production network in 62.x.x.x

So, Server1 10.0.0.10 -> GW DD-WRT 10.0.0.1 (Internal GW IP)/62.x.x.105 (WAN IP) -> 62.x.x.x (Proxy) -> Internet

Possible??
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 1997

PostPosted: Fri Mar 07, 2014 18:45    Post subject: Reply with quote
#!/bin/sh
PROXY_IP=62.192.16.3
PROXY_PORT=3128
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
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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