Hi all,
I am battling to get port forwarding to work using Kamikaze with the 2.4 kernel. I am using 2.4 because I need the pcmcia support of the WRT54G3G router.
What is strange is that opening up a local port works/ eg enabling port 22 in /etc/config/firewall or in /etc/firewall.user will allow one to get into the router but as soon as the port is forwarded to another machine on the lan it doesn't work. I have the following in /etc/firewall.user.
--------------------------------------------------------------------------------
#!/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
##switch on some logging
iptables -t nat -A prerouting_wan -p tcp --dport 80 -j LOG --log-level debug --log-prefix "IN http:"
iptables -A forwarding_wan -p tcp --dport 80 -j LOG --log-level debug --log-prefix "FOR http:"
# iptables -A FORWARD -j LOG --log-level debug
# iptables -A INPUT -j LOG --log-level debug
### 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 80 -j DNAT --to 192.168.12.216:80
iptables -A forwarding_wan -p tcp --dport 80 -d 192.168.12.216 -j ACCEPT
-----------------------------------------------------------------------------------------------------------------
I installed ulog and the following is output to logread.
Jan 1 01:29:34 OpenWrt user.debug kernel: IN http:IN=eth0.1 OUT= MAC=00:16:b6:d8:ef:63:00:1b:77:26:5b:89:08:00:45:00:00:3c SRC=192.168.1.3 DST=192.168.1.4 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=10558 DF PROTO=TCP SPT=53207 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0
Jan 1 01:29:34 OpenWrt user.debug kernel: FOR http:IN=eth0.1 OUT=br-lan SRC=192.168.1.3 DST=192.168.12.216 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=10558 DF PROTO=TCP SPT=53207 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0
So the port is being forwarded properly but there is no response back to the client. Anyone got any ideas? I managed to get it working once but then it never worked again on reboot. Accessing local port like ssh on the router always works.
thanks