portproxy - NAT-PMP/UPnP proxy

About portproxy

Due to lack of IPv4 addresses, many networks are using network address translation (NAT). That is an easy way to serve more hosts than available IPv4 addresses. Unfortunately, it is not possible to reach NATed hosts. To work around this problem, several different protocols were defined. They allow so called port forwarding on the NAT device. Two notable examples that allow such port forwarding configuration are NAT-PMP and uPNP. Unfortunately, sometimes hosts are not directly connected to the NAT device and an extra device is placed between. Here comes the Portproxy tool. It acts as an intermediate between clients and NAT device.

Project status

[done] - tasks that are completed [wip] - work in progress [todo] - to be done (tasks that are not yet started)


There are several screenshot available. Pleas see images/ directory.


Date Comments
all snapshots List of all snapshots.
2010-03-02 Portproxy update. It now supports --persistent parameter. It is possible to specify to bind IPv6 address or interface, even when this interface or address is not available yet. If socket binding fails, portproxy will sleep for 10 seconds and then try again. Also, if IPv6 address is not specified, portproxy will try to read it from specified WAN interface (--wan-interface).
2009-12-29 Complete code drop, with firmware images, documentation and source code. Extended NAT-PMP support added. First code drop with GUI supporting manual port forwarding and portproxy interface.
2009-12-03 Latest portproxy source code.
2009-11-04 Firmware image with ds-lite configuration GUI. There are 4 pages available: port forwarding, tunnel configuration (manual or via DHCPv6), automatic portproxy control and port forwarding rules limit. GUI is LuCI based.
2009-10-22 Firmware image with latest portproxy and extended GUI with lots of extra features. Portproxy properly handles NAT-PMP and UPnP traffic. GUI is LuCI based.
2009-10-04 Firmware image with portproxy and web GUI. Softwire tunnels may be configured (necessary modules are included in the firmware). NAT-PMP traffic is verified to be working both over Ethernet and Softwire as well. Example capture is attached.
2009-10-01 First working portproxy version. UDP traffic is forwarded between LAN and WAN, both ways. It was tested over IPv4. Traffic over IPv6 tunnel is next. First image based on OpenWRT r15834. To run the code, issue following command:
portproxy -l lanIPv4 -w wanIPv4 -n routerIPv4
2009-09-29 Command-line parsing added. First (untested) OpenWRT package create.
2009-09-28 First code snapshot. Forwarding UDP packets is working. The code is highly experimental. All parameters are hardcoded for now.
2009-09-14 Work on portproxy started.

Tomasz Mrugalski