OpenWrt Forum Archive

Topic: Port forwarding on Kamikaze 7.09

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

I have trawled the forums about this problem and see many people have problems with basic port forwarding on Kamikaze. It seems that the general recommendation is not to use /etc/config/firewall but rather add entries to /etc/firewall.user. The /etc/firewall.user file has some comments which suggest uncommenting the lines below will work. However like others experiences on the forum this appears not to work.

iptables -t nat -A prerouting_wan -p tcp --dport 80 -j DNAT --to XX.XX.XX.XX
iptables        -A forwarding_wan -p tcp --dport 80 -d XX.XX.XX.XX -j ACCEPT

Some posting suggest using prerouting_rule/forwarding_rule tables instead of the one use above. I haven't tried this yet but not sure what he implication are.

I am using the 3G connection on the WRT54G-3G. The /etc/config/network has been setup as follows:

config interface wan
    option ifname "ppp0"
    option proto   "3g"
    option device "/dev/usb/tts/0"
    option apn "apn"

I.E. the ppp0 interface of the 3g card should be considered the wan interface. Where can I find a definitive answer to port forwading in Kamikaze?
What extra packages do I need to install to get plain port forwarding of port 80 (http) to work?

thanks

(Last edited by mxc on 2 Jul 2008, 22:26)

If I use /etc/config/firewall with
# accept:proto=tcp dport=22
# forward:dport=80:192.168.11.108:80

I get errors like 

/bin/uci: /etc/config/firewall: 49: accept:proto=tcp: not found
/bin/uci: /etc/config/firewall: 50: forward:dport=80:192.168.11.108:80: not found

When running uci show.

ok I got it working but installing iptables-mod-ulog. I had also installed ip, iptables-nat. Not sure which one sorted it out. I had to use the rules in /etc/firewall.user

The discussion might have continued from here.