OpenWrt Forum Archive

Topic: Port forwarding not working

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

Hello,

I'm running openwrt on my Netgear WNDR3700v4 (a build from the developers forum as the v4 isn't officially supported yet). To this I have my Linux server connected which is running an Apache2 server on port 8092. The IP address of the server is 192.168.1.100 as assigned through a static DHCP leash. I've confirmed the IP address to be 192.168.1.100 by running the ifconfig command on it.

I can confirm the webserver is running by visiting 192.168.1.100:8092 from any device within the LAN. The page on the server will load up as expected. My port forward in /etc/config/firewall as created by the webinterface:

config redirect
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option src_dport '8092'
        option dest_ip '192.168.1.100'
        option dest_port '8092'
        option name 'Steph-Server'
        option proto 'tcp'

If I tick the 'LAN Loopback' option it works fine from within the LAN, even on the external (WAN) IP.
If I disable LAN Loopback and try to access it through <external ip>:8092 it doesn't work.

If I run wireshark on the server with a "tcp.port eq 8092" filter, nothing comes when I try to load the page over  the external ip.

That's as far as my knowledge goes. I would conclude that the firewall rules are being read and applied since the LAN loopback seems to be working. So something other than the firewall must be preventing the requests being forwarded to the server? Any help would be greatly appreciated.

I'm not a firewall guru, but your rule looks perfectly corrrect. So problem lies probably on the apache machine's firewall. I'd try to disable firewall on it and test again wink

Thank you for the reaction. The firewall on the Apache server has been disabled, and if I run dd-wrt or the netgear stock firmware with port forwarding it does work. So I can only imagine that something else on the router is blocking it. I have disabled/stopped the freifunk-p2p service as well to rule that out but without luck. I still can't access the web server.

The discussion might have continued from here.