Nat one to one

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


Joined: 01 Sep 2012
Posts: 4

PostPosted: Sun Sep 16, 2012 22:54    Post subject: Nat one to one Reply with quote
Here is the problem. I put in the following for the startup script.

# Save Startup
WANIF=`get_wanface`
ifconfig $WANIF:1 71.39.236.129 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.130 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.131 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.132 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.133 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.134 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.135 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.136 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.137 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.138 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.139 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.140 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.141 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.142 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.143 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.144 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.145 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.146 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.147 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.148 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.149 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.150 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.151 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.152 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.153 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.154 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.155 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.156 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.157 netmask [255.255.255.224] broadcast [71.39.236.159]
ifconfig $WANIF:1 71.39.236.158 netmask [255.255.255.224] broadcast [71.39.236.159]

It takes this just fine. Then when I put in the firewall save it crashes. If I put in up to .133 it works.

here is the firewall save file.
# Save Firewall
# WAN .129 -> LAN .29
iptables -t nat -I PREROUTING -d 71.39.236.129 -j DNAT --to 192.168.1.29
iptables -t nat -I POSTROUTING -s 192.168.1.29 -j SNAT --to 71.39.236.129
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 8003 -j ACCEPT

# WAN .130 -> LAN .30
iptables -t nat -I PREROUTING -d 71.39.236.130 -j DNAT --to 192.168.1.30
iptables -t nat -I POSTROUTING -s 192.168.1.30 -j SNAT --to 71.39.236.130
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.30 -p udp --dport 8003 -j ACCEPT

# WAN .131 -> LAN .31
iptables -t nat -I PREROUTING -d 71.39.236.131 -j DNAT --to 192.168.1.31
iptables -t nat -I POSTROUTING -s 192.168.1.31 -j SNAT --to 71.39.236.131
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.31 -p udp --dport 8003 -j ACCEPT

# WAN .132 -> LAN .32
iptables -t nat -I PREROUTING -d 71.39.236.132 -j DNAT --to 192.168.1.32
iptables -t nat -I POSTROUTING -s 192.168.1.32 -j SNAT --to 71.39.236.132
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.32 -p udp --dport 8003 -j ACCEPT

# WAN .133 -> LAN .33
iptables -t nat -I PREROUTING -d 71.39.236.133 -j DNAT --to 192.168.1.33
iptables -t nat -I POSTROUTING -s 192.168.1.33 -j SNAT --to 71.39.236.133
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.33 -p udp --dport 8003 -j ACCEPT

# WAN .134 -> LAN .34
iptables -t nat -I PREROUTING -d 71.39.236.134 -j DNAT --to 192.168.1.34
iptables -t nat -I POSTROUTING -s 192.168.1.34 -j SNAT --to 71.39.236.134
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.29 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.34 -p udp --dport 8003 -j ACCEPT

# WAN .135 -> LAN .35
iptables -t nat -I PREROUTING -d 71.39.236.135 -j DNAT --to 192.168.1.35
iptables -t nat -I POSTROUTING -s 192.168.1.35 -j SNAT --to 71.39.236.135
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.35 -p udp --dport 8003 -j ACCEPT

# WAN .136 -> LAN .36
iptables -t nat -I PREROUTING -d 71.39.236.136 -j DNAT --to 192.168.1.36
iptables -t nat -I POSTROUTING -s 192.168.1.36 -j SNAT --to 71.39.236.136
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.36 -p udp --dport 8003 -j ACCEPT

# WAN .137 -> LAN .37
iptables -t nat -I PREROUTING -d 71.39.236.137 -j DNAT --to 192.168.1.37
iptables -t nat -I POSTROUTING -s 192.168.1.37 -j SNAT --to 71.39.236.137
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.37 -p udp --dport 8003 -j ACCEPT

# WAN .138 -> LAN .38
iptables -t nat -I PREROUTING -d 71.39.236.138 -j DNAT --to 192.168.1.38
iptables -t nat -I POSTROUTING -s 192.168.1.38 -j SNAT --to 71.39.236.138
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.38 -p udp --dport 8003 -j ACCEPT

# WAN .139 -> LAN .39
iptables -t nat -I PREROUTING -d 71.39.236.139 -j DNAT --to 192.168.1.39
iptables -t nat -I POSTROUTING -s 192.168.1.39 -j SNAT --to 71.39.236.139
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.39 -p udp --dport 8003 -j ACCEPT

# WAN .140 -> LAN .40
iptables -t nat -I PREROUTING -d 71.39.236.140 -j DNAT --to 192.168.1.40
iptables -t nat -I POSTROUTING -s 192.168.1.40 -j SNAT --to 71.39.236.140
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.40 -p udp --dport 8003 -j ACCEPT

# WAN .141 -> LAN .41
iptables -t nat -I PREROUTING -d 71.39.236.141 -j DNAT --to 192.168.1.41
iptables -t nat -I POSTROUTING -s 192.168.1.41 -j SNAT --to 71.39.236.141
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.41 -p udp --dport 8003 -j ACCEPT

# WAN .142 -> LAN .42
iptables -t nat -I PREROUTING -d 71.39.236.142 -j DNAT --to 192.168.1.42
iptables -t nat -I POSTROUTING -s 192.168.1.42 -j SNAT --to 71.39.236.142
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.42 -p udp --dport 8003 -j ACCEPT

# WAN .143 -> LAN .43
iptables -t nat -I PREROUTING -d 71.39.236.143 -j DNAT --to 192.168.1.43
iptables -t nat -I POSTROUTING -s 192.168.1.43 -j SNAT --to 71.39.236.143
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.43 -p udp --dport 8003 -j ACCEPT

# WAN .144 -> LAN .44
iptables -t nat -I PREROUTING -d 71.39.236.144 -j DNAT --to 192.168.1.44
iptables -t nat -I POSTROUTING -s 192.168.1.44 -j SNAT --to 71.39.236.144
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.44 -p udp --dport 8003 -j ACCEPT

# WAN .145 -> LAN .45
iptables -t nat -I PREROUTING -d 71.39.236.145 -j DNAT --to 192.168.1.45
iptables -t nat -I POSTROUTING -s 192.168.1.45 -j SNAT --to 71.39.236.145
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.45 -p udp --dport 8003 -j ACCEPT

# WAN .146 -> LAN .46
iptables -t nat -I PREROUTING -d 71.39.236.146 -j DNAT --to 192.168.1.46
iptables -t nat -I POSTROUTING -s 192.168.1.46 -j SNAT --to 71.39.236.146
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.46 -p udp --dport 8003 -j ACCEPT

# WAN .147 -> LAN .47
iptables -t nat -I PREROUTING -d 71.39.236.147 -j DNAT --to 192.168.1.47
iptables -t nat -I POSTROUTING -s 192.168.1.47 -j SNAT --to 71.39.236.147
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.47 -p udp --dport 8003 -j ACCEPT

# WAN .148 -> LAN .48
iptables -t nat -I PREROUTING -d 71.39.236.148 -j DNAT --to 192.168.1.48
iptables -t nat -I POSTROUTING -s 192.168.1.48 -j SNAT --to 71.39.236.148
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.48 -p udp --dport 8003 -j ACCEPT

# WAN .149 -> LAN .49
iptables -t nat -I PREROUTING -d 71.39.236.149 -j DNAT --to 192.168.1.49
iptables -t nat -I POSTROUTING -s 192.168.1.49 -j SNAT --to 71.39.236.149
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.49 -p udp --dport 8003 -j ACCEPT

# WAN .150 -> LAN .50
iptables -t nat -I PREROUTING -d 71.39.236.150 -j DNAT --to 192.168.1.50
iptables -t nat -I POSTROUTING -s 192.168.1.50 -j SNAT --to 71.39.236.150
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.50 -p udp --dport 8003 -j ACCEPT

# WAN .151 -> LAN .51
iptables -t nat -I PREROUTING -d 71.39.236.151 -j DNAT --to 192.168.1.51
iptables -t nat -I POSTROUTING -s 192.168.1.51 -j SNAT --to 71.39.236.151
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p tcp --dport 8003 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 8000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 8001 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 8002 -j ACCEPT
iptables -I FORWARD -d 192.168.1.51 -p udp --dport 8003 -j ACCEPT

# WAN .152 -> LAN .52
iptables -t nat -I PREROUTING -d 71.39.236.152 -j DNAT --to 192.168.1.52
iptables -t nat -I POSTROUTING -s 192.168.1.52 -j SNAT --to 71.39.236.152
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 21 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 22 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 23 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 25 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 110 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 143 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 465 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 587 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 995 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 993 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 80 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 443 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 8080 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 10000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 20000 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 5900 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 69 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 5062 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p udp --dport 5063 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 5060 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 5061 -j ACCEPT
iptables -I FORWARD -d 192.168.1.52 -p tcp --dport 5062 -j ACCEPT
iptables
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 2251

PostPosted: Sun Sep 16, 2012 23:54    Post subject: Reply with quote
There's only a limited amount of storage/memory available. So it's entirely possible your commands are exhausting either storage (NVRAM), memory, or both. You need to find a means to reduce it, perhaps using a for loop, counters, etc., and combining rules more efficiently. Or even reading in the rules from external storage (you’d still want to reduce the impact to memory).
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