Unable to use with external NIC that has IP alias
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
miniupnpd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I connect to the Internet via a BEC ADSL modem/router set up in bridge mode. The result of this is that I get a real (static) IP from my provider, but there is also a RFC1918 address used to manage it. And that I have assigned as an alias on my server NIC. The problem is specifying that in /etc/default/
EXTIP="$(LC_ALL=C ${IP} addr show ${MiniUPnPd_
It will return all of the IP addresses assigned to that NIC. I fixed this on my system by adding '-m 1' to grep, like this:
EXTIP="$(LC_ALL=C ${IP} addr show ${MiniUPnPd_
That will of course mean that your external IP must be the first assignment for that NIC, and that should be noted in the default file.
With that said, the /etc/miniupnpd/
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: miniupnpd 1.8.20140523-4
ProcVersionSign
Uname: Linux 4.2.0-16-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
Date: Tue Jan 12 15:18:25 2016
InstallationDate: Installed on 2016-01-11 (1 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
ProcEnviron:
LANGUAGE=en_US
TERM=xterm-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: miniupnpd
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in miniupnpd (Ubuntu): | |
status: | New → Opinion |
status: | Opinion → New |
Changed in miniupnpd (Ubuntu): | |
status: | In Progress → Fix Released |
Your idea is worthwhile. However, the problem remains: which one is your wan ip? In your case it's the first one, in others' it may be the second one, the third one, that could be endless, not to say in some extreme situations, such ip will not show on the interface (behind DNAT). Much worse, miniupnpd itself will detect wan ip within the program when you don't tell it the external ip, which is far from init script can manage.
By the way, multiple external IP is yet another buggy thing which I'm not going to fix (see https:/ /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 685649# 32 ).
Nevertheless, I will try to figure out how miniupnpd detects external ip and make init script behave the same as it (which might be just exactly '-m 1').