EFW Support

Support => General Support => Topic started by: OCS on Saturday 07 July 2012, 10:01:40 am



Title: IPTables and multiple WAN IP addresses
Post by: OCS on Saturday 07 July 2012, 10:01:40 am
I'm currently using a router with DD-WRT but would like to move to a box with Endian on it.  I have two servers behind the router each of which need to be accessible over port 80 and a few other ports so I set up an IPTables rule to add another WAN IP address and forward that traffic to the second server:

Code:
/usr/sbin/ip addr add <External IP Address 2>/29 dev vlan1

/usr/sbin/iptables -t nat -I POSTROUTING 1 -p all -s <Internal IP Address 2> -j SNAT --to <External IP Address 2>

/usr/sbin/iptables -t nat -A PREROUTING -p tcp -d <External IP Address 2> --dport 80 -j DNAT --to-destination <Internal IP Address 2>:80
/usr/sbin/iptables -I FORWARD -p tcp -d <Internal IP Address 2> --dport 80 -j ACCEPT

Is this possible with Endian? 

Thanks.


Title: Re: IPTables and multiple WAN IP addresses
Post by: kashifmax on Wednesday 18 July 2012, 09:16:38 pm
In simple words, you mean port forwarding ? Yes it's possible...


Title: Re: IPTables and multiple WAN IP addresses
Post by: trymes on Friday 03 August 2012, 12:14:23 am
He also means multiple WAN IP addresses, and that should be possible, too.

Tom