# Open ports on a UPnP router

## skolima

I have a UPnP enabled router (Linksys AG241). In the local network, I have several PC's that require port forwarding from the router. All the Windows software I use is able to setup port forwarding via UPnP. However, I have to use a static address for the gentoo box (as opposed to DHCP for the Windows which I dual-boot) and forward the port from the router config. The software I use on linux cannot use UPnP. So, the question is:

Is there a way to setup an init script (probably net.eth0 postup function) to open ports on a UPnP router?

----------

## Bones McCracker

I can't understand your question.  That may be why 91 people have read this and nobody has responded.

----------

## desultory

From the package descriptions net-misc/linux-igd would seem to, at least potentially, fulfill your specified requirements.

----------

## skolima

igd is the reverse of what I need - it functions as a UPnP server, allowing other network devices to (partially) control your iptables/network interface settings. What I want is UPnP client that would run on my gentoo box and request from my UPnP router e.g. "open port 80 on the public IP and forward it to gentoo_box".

----------

## drwook

I believe individual apps generally deal with upnp themselves, e.g. Azureus can do upnp.  I also thought this was the situation on other platforms too?

----------

## skolima

It is, but some apps (well - most linux apps!) can't do this. And I want to set such rules for e.g. Apache and Subversion, which don't have UPnP functionality.

----------

## drwook

hmm well apache etc I'd set up statically myself...  Pretty sure IIS doesn't do upnp either?  So I think you're comparing different software (e.g. 'clienty' software like p2p apps may support upnp on any platform, 'servery' apps almost certainly won't on any platform)

It's an interesting thought to get a unified upnp framework, maybe coupled to dbus, in the medium term though...

----------

## Bones McCracker

There are several media-type servers for GNU/Linux that provde UPnP (MythTV, GeexBox, MediaTomb, TownkyMedia).  The only Linux-based UPnP client I can think of is GeexBox.  I imagine there are some chat clients too.

UPnP is basically Microsoft's somewhat bumbled and half-assed attempt at zero-configuration networking.  While I can understand that you might wish to integrate your Linux platform into an existing network of UPnP devices/applications, you might also like to look into the burgeoning zeroconf technologies that are more intrinsic to GNU/Linux (starting with avahi).

Good luck with it.    :Smile: 

----------

