[needs packaging] miniupnpd

Bug #313642 reported by shawnlandden
90
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Debian
Fix Released
Unknown
Ubuntu
Fix Released
Wishlist
Unassigned

Bug Description

[needs-packaging] miniupnpd

miniupnpd is a uPnP and NAT-PMP NAT transversal daemon written in ANSI C, it is light weight and does its job. It is implemented into a number of P2P applications and is the uPnP daemon of openwrt. There is no NAT-PMP daemon available in the repos.

URL: http://miniupnp.tuxfamily.org

License: BSD

Notes: Default is for BSDs but has a supported on Linux with a GNU Makefile. Ubuntu currently has no NAT-PMP server daemon

Dependencies: use: libptc
Compiling: make, gcc

Relevant links:
http://www.upnp.org
http://miniupnp.tuxfamily.org/nat-pmp.html
http://files.dns-sd.org/draft-cheshire-nat-pmp.txt
http://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol
http://en.wikipedia.org/wiki/Universal_Plug_and_Play

Revision history for this message
Duane Hinnen (duanedesign) wrote :

Thank you for taking the time to submit this report. In order for this to move forward we need a little more information. This is the ideal format.

package name: <requested package name>
description: <paragraph or two>
URL: <homepage_url>
license: <license>
notes: <anything that developers should know about the application>

 See the link below for a sample package request.

https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages/ExamplePackageRequest

description: updated
Revision history for this message
shawnlandden (shawnlandden) wrote :

[needs-packaging] miniupnpd

miniupnpd is a uPnP and NAT-PMP NAT transversal daemon written in ANSI C, it is light weight and does its job. It is implemented into a number of P2P applications and is the uPnP daemon of openwrt.

URL: http://miniupnp.tuxfamily.org
License: BSD
Notes: Default is for BSDs but has a supported on Linux with a GNU Makefile.
   Ubuntu currently has no NAT-PMP server daemon

dependencies: use: libptc
compiling: make, gcc

relevant links:
http://www.upnp.org

http://miniupnp.tuxfamily.org/nat-pmp.html
http://files.dns-sd.org/draft-cheshire-nat-pmp.txt

http://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol
http://en.wikipedia.org/wiki/Universal_Plug_and_Play

description: updated
Revision history for this message
miniupnp (miniupnp) wrote :

Attached is what is needed to make a package for Ubuntu Hardy.

Revision history for this message
hackeron (hackeron) wrote :

NAT-PMP or UPnP on my Ubuntu router would indeed be very nice. Seems like a standard feature on just about every router these days and if using Ubuntu in a server environment, at present you have to jump through hoops to get this functionality.

Revision history for this message
komputes (komputes) wrote :

Would this allow Ubuntu users to make port forward changes to next-gen routers like the Apple Time capsule? If so, it would be appreciated if anyone involved with the packaging of this project comment of this forum thread:

http://ubuntuforums.org/showthread.php?p=7637833

Revision history for this message
Jürgen Kreileder (jk) wrote :

@komputes: No, miniupnpd is a UPnP and NAT-PMP traversal daemon. Apples' AirPort and TimeCapsule run such a daemon too, not miniupnpd though.

(Ubuntu users can already make port forwarding changes on Apple's time capsule. Applications like Pidgin and Transmission speak UPnP and NAT-PMP, they make appropriate mappings while running. If you want to make permanent port forwardings you better use Apple's AirPort Utility.)

Revision history for this message
komputes (komputes) wrote :

The only problem is thet the application I am trying to use does not speak UPnP and NAT-PMP. Any instructions to make these changes without the use of a mac would be appreciated on the forum post. Thank you for your time.

Revision history for this message
shawnlandden (shawnlandden) wrote :

@komputes

Yes minupnp is both a server daemon (minupnpd). and a client library/program. You could use the program directly, or patch the program to use the minupnp NAT-PMP library. You can get the source here: http://miniupnp.tuxfamily.org/files/

what program are you thinking of? If it is free and open source software you should submit a bug, perhaps with your own patch.

summary: - [needs packaging] miniupnpd
+ [needs packaging] miniupnpd, miniupnpc
Changed in debian:
status: Unknown → New
summary: - [needs packaging] miniupnpd, miniupnpc
+ [needs packaging] miniupnpd
Revision history for this message
komputes (komputes) wrote :

@scientes

The application I was trying to use was gitso (simplifies reverse vnc remote assistance) http://code.google.com/p/gitso/

I do not believe gitso port forwards by NAT-PMP when set to to "Give support". Basically the network is being managed by an Apple Time Capsule, so if you think miniupnpc could manage that, I would be more than willing to try once given compiling and running instructions for Ubuntu 9.04. I assume this is a command line tool...

That said, I agree with this bug, it would be much easier if this was pre-packaged.

Revision history for this message
WattoDaToydarian (dannycan) wrote :

I have been trying to compile miniupnpd-20090605 on my ubuntu-server 9.04 which I use as my internet gateway/firewall.
I have gotten as far as building the daemon but I get this error:

gcc -Wall -Os -D_GNU_SOURCE -c -o netfilter/iptcrdr.o netfilter/iptcrdr.c
netfilter/iptcrdr.c:16:29: error: libiptc/libiptc.h: No such file or directory
In file included from netfilter/iptcrdr.c:17:
/usr/include/iptables.h:19: error: expected declaration specifiers or ‘...’ before ‘iptc_handle_t’
/usr/include/iptables.h:20: error: expected ‘;’, ‘,’ or ‘)’ before ‘chain’
/usr/include/iptables.h:22: error: expected ‘;’, ‘,’ or ‘)’ before ‘chain’
/usr/include/iptables.h:24: error: expected declaration specifiers or ‘...’ before ‘iptc_handle_t’
/usr/include/iptables.h:25: error: expected declaration specifiers or ‘...’ before ‘iptc_handle_t’
/usr/include/iptables.h:27: error: expected declaration specifiers or ‘...’ before ‘iptc_handle_t’
netfilter/iptcrdr.c:32:36: error: linux/netfilter/nf_nat.h: No such file or directory

It is my understanding that this means I am missing "libiptc" however I have installed all the dependencies as far as I can determine (build-essential, iptables-dev, linux-headers).

Could someone help me out with this please?

BTW, I second the notion to have this packaged!

Revision history for this message
miniupnp (miniupnp) wrote :

@WattoDaToydarian
for some reason uptables-dev is missing libiptc.h. You should try with iptable sources downloaded from netfilter.org

Revision history for this message
WattoDaToydarian (dannycan) wrote :

@miniupnp
I tried that too in this post http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=1388#1388
I don't have much experience in this area so I have no clue how to proceed.

Could someone post a deb package with lease file enabled? That would make it MUCH easier...

Revision history for this message
Bernhard Bock (bernhard-bock) wrote :

Try my package at http://repo.bock.nu/

Currenty, I only have an i386 package for karmic.
Source and 64bit packages may follow at some point in time, but they are not available at the moment.

Revision history for this message
Luke Yelavich (themuso) wrote :

I am interested in getting this packaged for maverick/Debian post squeeze, however as things stand at the moment, the iptables/iptables-dev packages don't have all the headers needed to build this. I need to do more digging to be exactly sure of what is required, however I have it built on my gateway box running Ubuntu Lucid, as I wanted a uPnP solutino, and linux-igd is dead upstrea.

Revision history for this message
Johan Kiviniemi (ion) wrote :

There’s incomplete packaging at http://github.com/ion1/miniupnpd-ubuntu

If someone would like to work on it and get it into Debian and Ubuntu, that would be great.

There’s a new upstream snapshot I haven’t got around to rebasing the packaging against, and there are a couple of things in TODO:

I: miniupnpd: hyphen-used-as-minus-sign usr/share/man/man1/miniupnpd.1.gz:6
W: miniupnpd: binary-without-manpage usr/sbin/miniupnpdctl

The header issue has been handled in the packaging.

Revision history for this message
hackeron (hackeron) wrote :

Since this package is still not available, is there any alternative package at all available to get uPnP and/or NAT-PMP NAT transversal in Ubuntu?

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 313642] Re: [needs packaging] miniupnpd

There is linux-igd, but that is somewhat old.

Revision history for this message
WattoDaToydarian (dannycan) wrote :

@Bernhard Bock
Your package is kinda old now and I can't get the leases file to work.
It says:
Parsing error file /etc/miniupnpd.conf line 33 : lease_file=/var/log/upnp.leaeses

Could you build a new package?
Thx!

Revision history for this message
miniupnp (miniupnp) wrote :

WattoDaToydarian a écrit :
> @Bernhard Bock
> Your package is kinda old now and I can't get the leases file to work.
> It says:
> Parsing error file /etc/miniupnpd.conf line 33 : lease_file=/var/log/upnp.leaeses
>
> Could you build a new package?
> Thx

Well, the lease file is not a feature that is enabled by default so that
shouldn't be a problem to have a package without it.

To enable the lease file, the macro ENABLE_LEASEFILE has to be defined.
It is usually done in the config.h file.
To change the default content of config.h, one should edit genconfig.sh.

I'm in vacation now, and will look at it when I'm back home.

Revision history for this message
WattoDaToydarian (dannycan) wrote :

Could someone please make a new deb package?
I have the one at http://repo.bock.nu/dists/karmic/main/binary-i386/ but it's from 2009, doesn't have an upstart script, and leasefile isn't enabled.

Thanks!

Revision history for this message
urusha (urusha) wrote :

Here is working package for guruplug server plus. It's ugly, created with checkinstall and ftp://ftp.netfilter.org/pub/iptables/iptables-1.4.2.tar.bz2 (there's no needed files in lenny's iptables-dev), but it works fine. Packet is in attachment.
Nice daemon. It is good idea to build it for other architectures.

Revision history for this message
WattoDaToydarian (dannycan) wrote :

Oh neat! Did you build this one? Is there a i386 version for PC servers?

Revision history for this message
urusha (urusha) wrote :

Yes, I built it. So, I tried to compile it on lucid i386. No success. My actions:
# pwd
/tmp
# apt-get source iptables
# apt-get build-dep iptables
# cd iptables-1.4.4
# ./configure
# make
### here I get error: /include/linux/netfilter_ipv4/ipt_ECN.h:11: fatal error: linux/netfilter_ipv4/ipt_DSCP.h: No such file or directory
### but I also successfully tried to build 1.4.7
# cd ..
# wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpd-1.4.20100921.tar.gz'
# tar xpvf miniupnpd-1.4.20100921
# cd miniupnpd-1.4.20100921
# IPTABLESPATH=/tmp/iptables-1.4.4 make -f Makefile.linux
### here I get error:
### make: *** No rule to make target `/tmp/iptables-1.4.4/libiptc/.libs/libiptc.a', needed by `miniupnpd'. Stop.

Something wrong with iptables. On guru I have 1.4.2 and there's no problems. I'm not a developer and at this moment I don't need package for i386. So, I give up. Sorry.

Revision history for this message
Rianav Antares (grianav) wrote :
Download full text (4.1 KiB)

The above instructions differ from the ones here: http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=1441

cd iptables-1.4.3.2
 ./configure --enable-devel --disable-ipv6 --enable-libipq --enable-static
 make
 cd ../miniupnpd
 IPTABLESPATH=../iptables-1.4.3.2 make -f Makefile.linux

The versioning is different: iptables-1.4.3.2 vs iptables-1.4.4. Make sure and read the INSTALL file given for both source packages.

Currently this is erroring out for me on Debian Sid when using the latest release of both projects with this:
 gcc -L/home/rianav/development/iptables-1.4.10/libiptc/ miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o upnpreplyparse.o minixml.o upnpredirect.o getifaddr.o daemonize.o upnpglobalvars.o options.o upnppermissions.o minissdp.o natpmp.o upnpevents.o linux/getifstats.o netfilter/iptcrdr.o /home/rianav/development/iptables-1.4.10/libiptc/.libs/libiptc.a -o miniupnpd
netfilter/iptcrdr.o: In function `list_redirect_rule':
iptcrdr.c:(.text+0x8f): undefined reference to `iptc_init'
iptcrdr.c:(.text+0xa3): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0xc3): undefined reference to `iptc_is_chain'
iptcrdr.c:(.text+0xe0): undefined reference to `iptc_free'
iptcrdr.c:(.text+0x103): undefined reference to `iptc_first_rule'
iptcrdr.c:(.text+0x11c): undefined reference to `iptc_get_target'
iptcrdr.c:(.text+0x346): undefined reference to `iptc_next_rule'
iptcrdr.c:(.text+0x35a): undefined reference to `iptc_free'
netfilter/iptcrdr.o: In function `iptc_init_verify_and_append':
iptcrdr.c:(.text+0x469): undefined reference to `iptc_init'
iptcrdr.c:(.text+0x47d): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0x4a1): undefined reference to `iptc_is_chain'
iptcrdr.c:(.text+0x4b1): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0x4d0): undefined reference to `iptc_free'
iptcrdr.c:(.text+0x4e3): undefined reference to `iptc_append_entry'
iptcrdr.c:(.text+0x4f3): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0x508): undefined reference to `iptc_commit'
iptcrdr.c:(.text+0x518): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0x52d): undefined reference to `iptc_free'
netfilter/iptcrdr.o: In function `delete_rule_and_commit':
iptcrdr.c:(.text+0x7d1): undefined reference to `iptc_delete_num_entry'
iptcrdr.c:(.text+0x7e1): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0x7f9): undefined reference to `iptc_commit'
iptcrdr.c:(.text+0x809): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0x831): undefined reference to `iptc_free'
netfilter/iptcrdr.o: In function `delete_redirect_and_filter_rules':
iptcrdr.c:(.text+0x857): undefined reference to `iptc_init'
iptcrdr.c:(.text+0x86e): undefined reference to `iptc_strerror'
iptcrdr.c:(.text+0x896): undefined reference to `iptc_is_chain'
iptcrdr.c:(.text+0x8c3): undefined reference to `iptc_first_rule'
iptcrdr.c:(.text+0x8e9): undefined reference to `iptc_next_rule'
iptcrdr.c:(.text+0x902): undefined reference to `iptc_free'
iptcrdr.c:(.text+0x928): undefined reference to `iptc_init'
iptcrdr.c:(.text+0x951): undefined reference to `iptc_init'
netfilter/iptcrdr.o: In function `get_redirect_rule_by_index':
iptcrdr.c:(.text+0x9ed): undef...

Read more...

Revision history for this message
Rianav Antares (grianav) wrote :

 To add to the above: I opened the libiptc.a located in /home/rianav/development/iptables-1.4.10/libiptc/.libs/ and found only "<arch>" . I then renamed the libip4tc.a found in the same directory to libiptc.a ad ran "make" again. This time it completed without any errors and I installed with "make install". Need to test the programs now.
 I theorize the libiptc.a located in /home/rianav/development/iptables-1.4.10/libiptc/.libs/ is just a placeholder/shim? and any program needs to use either libip4tc.a or libip6tc.a specifically? Perhaps I should read the documentation...
 I wish Debian would just package the full development headers of iptables like all the other distributions do...
 Hope this helps someone,
 Cheers!

Revision history for this message
Rianav Antares (grianav) wrote :

Hello,
See this Debian bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=444392 for more information.
Regards.

Revision history for this message
Odin Hørthe Omdal (velmont) wrote :

There has been some rather nice progress on the debian bug. The iptables.h will just get included into the package, and it is now very close to being tested. I look forward to the day I can

> apt-get remove linux-igd
> apt-get install miniupnpd

Revision history for this message
Johan Kiviniemi (ion) wrote :

My packaging (linked earlier) contains a minimal version of the required header.

Changed in debian:
status: New → Fix Committed
Changed in debian:
status: Fix Committed → Fix Released
Revision history for this message
Johan Kiviniemi (ion) wrote :

Switch Debian bug watch from a bug about miniupnpc to one about miniupnpd.

Changed in debian:
status: Fix Released → Unknown
Changed in debian:
status: Unknown → New
Revision history for this message
Maciej Bliziński (maciej-blizinski) wrote :

When compiling miniupnpd, I didn't have any issues with header files, perhaps they were resolved in later miniupnpd versions. I've built a proof of concept and uploaded it to my PPA.

https://launchpad.net/~maciej-blizinski/+archive/default

Changed in debian:
status: New → Fix Committed
Revision history for this message
Halvor Lyche Strandvoll (halvors) wrote :

Is this going to be avaliable in Ubuntu 12.04 repositories?

Changed in ubuntu:
status: Confirmed → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Jeremy Bícha (jbicha) wrote :

This bug was fixed in the package miniupnpd - 1.7-1

---------------
miniupnpd (1.7-1) experimental; urgency=low

  * Initial release (Closes: #658434).

 -- Thomas Goirand <email address hidden> Thu, 02 Feb 2012 23:08:05 +0000

Changed in ubuntu:
status: Confirmed → Fix Released
Changed in debian:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.