Category Archives: DD-WRT

DD-WRT Command line port forward

Port Forwarding can be accomplished from within the web interface here. However, the very same thing can be done a bit differently (tested and working), via command line.  Example from port 8021 to IP and port 21

iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport 8021 -j DNAT --to
iptables -I FORWARD -p tcp -d --dport 21 -j ACCEPT