aMule Bug Tracker - aMule
View Issue Details
0001406aMuleExternal Connpublic2008-09-07 03:512008-09-07 03:51
Osiris X 
 
normalmajoralways
newopen 
2.2.2 
 
Debian Linux lenny/sid - Linux Kernel 2.6.26
0001406: amule: UPnP failing to open ports on router from a multi-homed machine
I have a multi-homed machine with 2 interfaces - eth0 (192.168.0.1) & eth1 (192.168.1.x). My router is
connected to eth1 and has ip address 192.168.1.254. When I run aMule on this machine it starts up and
appears to bind the UPnP port TCP/50000 to eth0 instead of eth1, regardless of whether I set a bind
address in the aMule preferences or not. (NB. according to 'netstat -ap' aMule binds the UPnP port
TCP/50000 to all interfaces). It then fails to detect any WAN service - see aMule log below:

2008-08-26 14:06:44: UPnPBase.cpp(868): Universal Plug and Play: bound to 192.168.0.1:50000.
2008-08-26 14:06:44: UPnPBase.cpp(939): Universal Plug and Play: UPnP Error:
CUPnPControlPoint::AddPortMapping: WAN Service not detected.

However a short time later, after 'Low-ID' connection to the ED2K network and 'firewalled' connection
to the KAD network, aMule finally notices that there is a UPnP capable router accessible through eth1
and the aMule log shows:

2008-08-26 14:22:11: UPnPBase.cpp(562): Universal Plug and Play: Uninteresting service detected:
'urn:schemas-upnp-org:service:WANDSLLinkConfig:1'. Ignoring.
2008-08-26 14:22:11: UPnPBase.cpp(545): Universal Plug and Play: WAN Service Detected:
'urn:schemas-upnp-org:service:WANIPConnection:1'.
2008-08-26 14:22:11: UPnPBase.cpp(1529): Universal Plug and Play: Successfully retrieved SCPD Document
for service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL:
http://192.168.1.254:80/upnp/event/igd/wanipcRoutedEthoA. [^]
2008-08-26 14:22:11: UPnPBase.cpp(1543): Universal Plug and Play: Successfully subscribed to service
urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL:
http://192.168.1.254:80/upnp/event/igd/wanipcRoutedEthoA. [^]
2008-08-26 14:22:11: UPnPBase.cpp(562): Universal Plug and Play: Uninteresting service detected:
'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'. Ignoring.
2008-08-26 14:22:11: UPnPBase.cpp(562): Universal Plug and Play: Uninteresting service detected:
'urn:schemas-upnp-org:service:Layer3Forwarding:1'. Ignoring.

However it still does not open any ports on my router (192.168.1.254).

Afterwards I periodically get the following message in the aMule log:

2008-08-26 14:52:02: UPnPBase.cpp(1338): Universal Plug and Play: UPNP_EVENT_AUTORENEWAL_FAILED:
Re-subscribed to EventURL 'http://192.168.1.254:80/upnp/event/igd/wanipcRoutedEthoA' [^] with SID ==
'uuid:28e0dce2-1dd2-11b2-91d7-f7e3500ea8f3'.

On reflection, it is entirely possible that this problem is router
specific.

My router is a Thomson Speedtouch 585 provided by the ISP Be (UK). This
router is highly configurable from a CLI, so maybe there are options I
could alter to make it work with aMule.

However it should be noted that the Deluge Bittorrent Client v0.5.9.3
and Skype v2.0.0.72 both successfully use UPnP to open ports on the
router when run from my debian linux system.

I am running an iptables firewall on this debian machine. Below are the rules
I have used allow UPnP SSDP packets (both to and from port 1900 and
multicast)

iptables -A INPUT -i [router if] -s [router ip] -d 224.0.0.0/4 -j ACCEPT

iptables -A INPUT -i [router if] -p udp -s [router ip] --sport 1900
--dport [ports 1025+] -j ACCEPT

iptables -A INPUT -i [router if] -p udp -s [router ip] --dport 1900
--sport [ports 1025+] -j ACCEPT

iptables -A OUTPUT -o [router if] -d 224.0.0.0/4 -j ACCEPT
iptables -A OUTPUT -o [router if] -p tcp --sport [ports 1025+] -j ACCEPT
iptables -A OUTPUT -o [router if] -p udp --sport [ports 1025+] -j ACCEPT

In addition I have added the following aMule specific rules relating to my
specific aMule config:

iptables -A INPUT -i [router if] -p tcp --dport [aMule TCP port] --sport
[ports 1025+] -j ACCEPT(syn-flood checked)
iptables -A INPUT -i [router if] -p udp --dport [aMule UDP port] --sport
[ports 1025+] -j ACCEPT
iptables -A INPUT -i [router if] -p udp --dport [aMule Extended UDP port]
--sport [ports 1025+] -j ACCEPT
iptables -A INPUT -i [router if] -p tcp --dport [aMule UPnP port]
--sport [ports 1025+] -j ACCEPT(syn-flood checked)

I believe these rules should be sufficient.

Any ideas on how I can fix this? Is this something that tweaking a parameter in the source and
re-compiling could fix?

Any help, pointers or solutions on how to aMule UPnP to successfully open
ports on my router would be most welcome.

Thanks in advance.

Os
Debian Bug Report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=496654 [^]

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages amule depends on:
ii amule-common 2.2.2-1 common files for amule
ii amule-i18n-en-gb [a 2.2.2-1 English (en_GB) internationalized
ii binutils 2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii libc6 2.7-13 GNU C Library: Shared libraries
ii libcrypto++7 5.5.2-2 General purpose cryptographic shar
ii libgcc1 1:4.3.1-2 GCC support library
ii libgeoip1 1.4.4.dfsg-3 A non-DNS IP-to-country resolver l
ii libstdc++6 4.3.1-2 The GNU Standard C++ Library v3
ii libupnp3 1:1.6.6-3 Portable SDK for UPnP Devices (sha
ii libwxbase2.8-0 2.8.7.1-1 wxBase library (runtime) - non-GUI
ii libwxgtk2.8-0 2.8.7.1-1 wxWidgets Cross-platform C++ GUI t
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages amule recommends:
pn amule-cas <none> (no description available)
pn amule-utils <none> (no description available)
pn amule-wxcas <none> (no description available)

Versions of packages amule suggests:
pn amule-ed2k <none> (no description available)
pn amule-xas <none> (no description available)

-- no debconf information
No tags attached.
Issue History
2008-09-07 03:51Osiris XNew Issue
2008-09-07 03:51Osiris XOperating System => Debian Linux lenny/sid - Linux Kernel 2.6.26

There are no notes attached to this issue.