miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

501 error

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs
View previous topic :: View next topic  
Author Message
red_uk



Joined: 29 Nov 2016
Posts: 4

PostPosted: Tue Nov 29, 2016 6:28 am    Post subject: 501 error Reply with quote

Hi,

Thanks for your hard work Smile

Miniupnp client installed on pi (wheezy) with a Ubiquiti Edgerouter running upnp2 server

I'm getting a 501 error on running upnpc -a

possibly, as a result, the router is creating the NAT port forward, but not the firewall pinhole.

Any ideas?!

Many thanks,

Red,



upnpc -a 192.168.44.104 12 12345 TCP
upnpc : miniupnpc library test client. (c) 2006-2010 Thomas Bernard
Go to xxxxx
for more information.
List of UPNP devices found on the network :
desc: url:192.168.44.1:50585/rootDesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : url:192.168.44.1:50585/ctl/IPConn
Local LAN ip address : 192.168.44.104
ExternalIPAddress = xx.xx.xx.xx
AddPortMapping(12345, 12, 192.168.44.104) failed with code 501 (Action Failed)
InternalIP:Port = 192.168.44.104:12
external xx.xx.xx.xx:12345 TCP is redirected to internal 192.168.44.104:12
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Wed Nov 30, 2016 10:52 pm    Post subject: Reply with quote

what are the log on the router

Also what is the software providing IGDv2 on the Ubiquiti Edgerouter ?
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
red_uk



Joined: 29 Nov 2016
Posts: 4

PostPosted: Fri Dec 02, 2016 7:00 am    Post subject: Reply with quote

Hi,

run from the client:

~ $ upnpc -a 192.168.44.104 14 12347 TCP
upnpc : miniupnpc library test client. (c) 2006-2010 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.44.1:38272/rootDesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://192.168.44.1:38272/ctl/IPConn
Local LAN ip address : 192.168.44.104
ExternalIPAddress = xxxxxxxx
AddPortMapping(12347, 14, 192.168.44.104) failed with code 501 (Action Failed)
InternalIP:Port = 192.168.44.104:14
external xxxxxxxx:12347 TCP is redirected to internal 192.168.44.104:14


log from the EdgeRouter

Dec 2 06:51:33 ubnt miniupnpd[2115]: addmasqueraderule() : chain MINIUPNPD-POSTROUTING not found
Dec 2 06:51:33 ubnt miniupnpd[2115]: add_redirect_rule2(): addmasqueraderule returned -1


Show rules from the ER

~$ show upnp2 rules
Firewall pin holes
pkts bytes target prot opt in out source destination
110 15070 ACCEPT udp -- * * 0.0.0.0/0 192.168.44.127 udp dpt:53866


NAT port forwards
pkts bytes target prot opt in out source destination
0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:53866 to:192.168.44.127:53866
0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:12347 to:192.168.44.104:14


from the client:

~ $ upnpc -l
upnpc : miniupnpc library test client. (c) 2006-2010 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.44.1:38272/rootDesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://192.168.44.1:38272/ctl/IPConn
Local LAN ip address : 192.168.44.104
Connection Type : IP_Routed
Status : Connected, uptime=319912s, LastConnectionError : ERROR_NONE
Time started : Mon Nov 28 14:03:13 2016
MaxBitRateDown : 1000000000 bps MaxBitRateUp 1000000000 bps
ExternalIPAddress = xxxxxxxx

1 UDP 53855->192.168.44.127:53866 'xxxxxxx' ''
|
8 TCP 12347->192.168.44.104:14 'libminiupnpc' ''
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Fri Dec 02, 2016 10:39 am    Post subject: Reply with quote

The log is pretty clear, don't you think ?

red_uk wrote:

Dec 2 06:51:33 ubnt miniupnpd[2115]: addmasqueraderule() : chain MINIUPNPD-POSTROUTING not found
Dec 2 06:51:33 ubnt miniupnpd[2115]: add_redirect_rule2(): addmasqueraderule returned -1


please create the MINIUPNPD-POSTROUTING chain
look at netfilter/iptables_init.sh file
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
red_uk



Joined: 29 Nov 2016
Posts: 4

PostPosted: Fri Dec 02, 2016 10:48 am    Post subject: Reply with quote

forgive me, but not my area of expertise.

is this relating to Ubiquiti's implementation of miniupnp on the edgerouter, or something specific to the upnp2 request i'm making?

Chris.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Fri Dec 02, 2016 7:36 pm    Post subject: Reply with quote

red_uk wrote:
forgive me, but not my area of expertise.

is this relating to Ubiquiti's implementation of miniupnp on the edgerouter, or something specific to the upnp2 request i'm making?

Chris.

It is related to not setting the chains correctly... RTFM
https://github.com/miniupnp/miniupnp/blob/master/miniupnpd/INSTALL#L76
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
red_uk



Joined: 29 Nov 2016
Posts: 4

PostPosted: Sun Dec 04, 2016 7:28 am    Post subject: Reply with quote

Thanks for your time and pointers to understand this.

It seems ubiquiti have recognised there's an issue with 1.9.0 of their firmware.

https://community.ubnt.com/t5/EdgeMAX/ERL-3-upnp2-no-longer-working-after-upgrade-from-1-8-5-to-1-9-0/td-p/1644728

Regards,

Chris.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.