Multiple WAN IPs#

In a previous post I talked about how I was dd-wrt to route multiple WAN IPs. Well, ever since that post I have been screwing with it because it has not been working quite right. I finally figured it out with the help of some forums out there. Use the below script in the Firewall section under Administration->Commands to route multiple WAN IP's to internal IPs:

ip addr add [extra wan_ip]/29 dev vlan1

iptables -I FORWARD -d [internal ip] -j ACCEPT

iptables -t nat -I PREROUTING 1 -p all -d [extra wan ip] -j DNAT --to [internal ip]

iptables -t nat -I POSTROUTING 1 -p all -s [internal ip] -j SNAT --to [extra wan ip]


The main piece I was missing was the first line which puts the extra wan ip on the same vlan as the wan ip the router is using.


Hopefully this will save someone from having to scroll through forum posts looking for an answer.

Sunday, February 17, 2008 1:20:16 AM (GMT Standard Time, UTC+00:00) #    Comments [0]  | 

 

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
All content © 2008, John Luif