rendered paste bodyroot@OpenWrt:~# nvram show
os_ram_addr=80001000
wan_device=vlan1
il0macaddr=00:13:10:82:0f:98
boardrev=0x10
et0macaddr=00:13:10:82:0F:96
bootnv_ver=2
wl0_akm=none
watchdog=5000
boot_wait=off
wl0_infra=1
et0mdcport=0
pmon_ver=CFE 3.61.13.0
lan_gateway=192.168.1.1
wl0_ifname=eth1
vlan0ports=1 2 3 4 5*
gpio5=robo_reset
wl0_mode=wet
os_flash_addr=bfc40000
sromrev=2
boardtype=0x0708
lan_netmask=255.255.255.0
wl0_ssid=hollimonwireless
wan_netmask=255.255.255.0
wl0id=0x4320
ag0=255
wl0_closed=0
wl0_macmode=disabled
wl0gpio2=0
wl0gpio3=0
wl0_lazywds=1
boardflags2=0
wl0_antdiv=-1
wan_proto=dhcp
pa0itssit=62
wl0_wds=
cctl=0
lan_ifnames=vlan0 eth1 eth2
lan_dns=68.10.16.30 68.10.16.25 192.168.1.1
pa0maxpwr=0x4e
lan_ipaddr=192.168.1.2
clkfreq=216
lan_proto=static
aa0=3
vlan1hwname=et0
wl0_wep=disabled
sdram_config=0x0062
vlan1ports=0 5
eou_private_key=7c5fa90fd25c1d142bde84379ba3889fcf82458926784b2c4533f0d1f3f667084bfeb43aabfc42a789adec5b99d32200e381d02425e3220df3a1a23269fdb9f02c6bd44da86e26782d9985fd9b1e62b3a04141cafc7d49e696019caca9b59b646ee70158357eb5f8b4ac61291f7cf2053f0d5f1c8249c2fc11a9ed1e509f8801
scratch=a0180000
ccode=0
eou_device_id=BEDAJHAX
lan_ifname=br0
boardflags=0x0118
sdram_refresh=0x0000
sdram_ncdl=0xfe0008
wan_ipaddr=192.168.1.2
et0phyaddr=30
wan_ifname=vlan1
wl0_radio=1
pa0b0=0x15eb
pa0b1=0xfa82
wl0_maclist=
pa0b2=0xfe66
sdram_init=0x010b
vlan0hwname=et0
dl_ram_addr=a0001000
wl0_channel=6
boot_ver=v3.4
wl0_crypto=tkip
boardnum=42
eou_public_key=c036bf758aeb72c215409dca4d9fa499e39ac88e242e45a18238ffd01bf12ade46e6b971f285db6003529bd36217c02feb3cfbdac6307a72a71111f0d25993babe4d9802c3c69ca344418d9108b7268b2f9c4f380a77c5b7095c53f524a68cbb92285fd8c86945d504d267fc05cb517547757cf4e09cfe01366b02d85a93d42111
size: 1728 bytes (31040 left)
root@OpenWrt:~#
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
iptables -F input_rule
iptables -F output_rule
iptables -F forwarding_rule
iptables -t nat -F prerouting_rule
iptables -t nat -F postrouting_rule
# The following chains are for traffic directed at the IP of the
# WAN interface
iptables -F input_wan
iptables -F forwarding_wan
iptables -t nat -F prerouting_wan
### Open port to WAN
## -- This allows port 22 to be answered by (dropbear on) the router
iptables -t nat -A prerouting_wan -p tcp --dport 22 -j ACCEPT
iptables -A input_wan -p tcp --dport 22 -j ACCEPT
### Port forwarding
## -- This forwards port 8080 on the WAN to port 80 on 192.168.1.2
iptables -t nat -A prerouting_wan -p tcp --dport 8080 -j DNAT --to 192.168.1.2:
iptables -A forwarding_wan -p tcp --dport 80 -d 192.168.1.2 -j ACCEPT
### DMZ
## -- Connections to ports not handled above will be forwarded to 192.168.1.2
# iptables -t nat -A prerouting_wan -j DNAT --to 192.168.1.2
# iptables -A forwarding_wan -d 192.168.1.2 -j ACCEPT