OpenWrt Forum Archive

Topic: Port forwarding in Webif

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

Has anyone done any dev work for port forwarding via the web interface?  I am currently using RC4 and saw no such page present.

I've written a page using haserl and the modular structure (with light modification to /usr/lib/webif/webif.sh to add a few display formatting functions, although this may be unnecessary) and adding a separate port-forward.awk file to support parsing of /etc/firewall.user.

It currently supports adding and deleting of entries and does error checking to verify no duplicate entries or multiple entries for a port/protocol are entered.  I would love to contribute as I believe this is a great project and it has given me the ability to do a lot more with my WRT54G than I could using HyperWRT.

There is such page in pre-RC5 by nbl. ( Checkout downloads / people / nbl @ http://www.openwrt.org )

Maybe you should check out what it looks with his port opening page.

It looks pretty good for people that like to read iptables -L but it could be a little better, I once re-flashed my wrt54gs becaus it got messed up that badly that no ports openeded at all. Reason was that I made port ranges open and I configured it wrong. (I configured both outbound port ranges + target port ranges, when target port ranges should not be configured when configuring port ranges) After this, I wasn't able to make it work no more, so I reflashed and emptied my setup.

Also, I have a pretty good idea (I think). There should be description for opened ports, a field where user can save a custom string describing what reason these ports are open. I have a bad memory and I run servers in my network, I have pretty many ports open, for ftp, http, ssh and port ranges for NX plus more, so after six months when I decide to check my setup I am about to wonder, what is this port that is open because there's no description why it's open..

The discussion might have continued from here.