Edgemarc 4500 Multiple Port Forwarding

We’ve had quite a few people ask how to forward multiple ports on an Edgemarc 4500.  Here are the user commands:


iptables -I FORWARD -i eth1 -d <internal IP> -p tcp –dport 10000:20000 -j ACCEPT

iptables -A PREROUTING -t nat -p tcp --dport 10000:20000 -d <outside IP> -j DNAT --to <internal IP>:10000-20000

iptables -A POSTROUTING -t nat -p tcp -s <internal IP> --dport 10000:20000 -j SNAT --to <outside IP>

iptables -t nat -A POSTROUTING -p tcp -d <internal IP> --dport 10000:20000 -s <inside network (i.e. 192.168.1.0)>/24 -j SNAT --to <inside IP of edgemarc (i.e. 192.168.1.1)>


I didn’t come up with this, obviously.  Credit goes to Jonathan Ray.  Of course, he’ll tell me he found them somewhere else, which I know is a lie, because he is “The Wizard.”

No comments yet.

Leave a Reply