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 

Trying to add port forward but get: 402 Invalid args

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
Stuffe



Joined: 27 Jan 2015
Posts: 5
Location: Denmark

PostPosted: Tue Jan 27, 2015 9:55 pm    Post subject: Trying to add port forward but get: 402 Invalid args Reply with quote

I will start out by saying that this is my first attempt at messing with port forwarding, so bear with me if I ask something that is kind of dumb. I downloaded the windows binary and tried:


Code:

c:\Python27>C:\Users\Stuffe\Desktop\asd2\upnpc-shared.exe -a 10.0.0.35 8000 8000 TCP
upnpc : miniupnpc library test client. (c) 2005-2014 Thomas Bernard
for more information.

Local LAN ip address : 10.0.0.35
ExternalIPAddress = 192.168.1.11
AddPortMapping(21, 21, 169.254.221.248) failed with code 402 (Invalid Args)
GetSpecificPortMappingEntry() failed with code -1 (Miniupnpc Unknown Error)


As you can see 10.0.0.35 is my LAN ip so it should work? I also checked -l but port 8000 wasn't bound to anything else. Thanks in advance if anyone can help.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Wed Jan 28, 2015 9:58 am    Post subject: Reply with quote

that is strange :
Code:
AddPortMapping(21, 21, 169.254.221.248)

havent you used -a 169.254.221.248 21 21 ?

what is the output of upnpc-static -s ?
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Stuffe



Joined: 27 Jan 2015
Posts: 5
Location: Denmark

PostPosted: Wed Jan 28, 2015 7:01 pm    Post subject: Reply with quote

miniupnp wrote:
that is strange :
Code:
AddPortMapping(21, 21, 169.254.221.248)

havent you used -a 169.254.221.248 21 21 ?

what is the output of upnpc-static -s ?


I think I copy pasted a bunch of lines from the console and then deleted in the middle, since because it was my first post I also couldn't have links. So I somehow managed to merge the input and output from two different commands.

Heres the result from static -s
Code:
c:\Python27>C:\Users\Stuffe\Desktop\asd2\upnpc-static.exe -s
upnpc : miniupnpc library test client. (c) 2005-2014 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://10.0.0.1:5000/Public_UPNP_gatedesc.xml
 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://10.0.0.1:5000/Public_UPNP_C3
Local LAN ip address : 10.0.0.35
Connection Type : IP_Routed
Status : Connected, uptime=5285623s, LastConnectionError : ERROR_NONE
  Time started : Fri Nov 28 15:43:02 2014
MaxBitRateDown : 100000000 bps (100.0 Mbps)   MaxBitRateUp 100000000 bps (100.0
Mbps)
ExternalIPAddress = 192.168.1.11
Bytes:   Sent: 3114863781       Recv: 993107685
Packets: Sent: 141341815        Recv: 222884447
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Thu Jan 29, 2015 10:17 am    Post subject: Reply with quote

it looks OK. So what is the REAL output of -a 10.0.0.35 8000 8000 TCP ?
(you could use "-r 8000 TCP" also)
use -l option to list existing redirections
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Stuffe



Joined: 27 Jan 2015
Posts: 5
Location: Denmark

PostPosted: Thu Jan 29, 2015 7:10 pm    Post subject: Reply with quote

miniupnp wrote:
it looks OK. So what is the REAL output of -a 10.0.0.35 8000 8000 TCP ?
(you could use "-r 8000 TCP" also)
use -l option to list existing redirections


Here is the output of -a
Code:
C:\Users\Stuffe>C:\Users\Stuffe\Desktop\asd2\upnpc-shared.exe -a 10.0.0.35 8000
8000 TCP
upnpc : miniupnpc library test client. (c) 2005-2014 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://10.0.0.1:5000/Public_UPNP_gatedesc.xml
 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://10.0.0.1:5000/Public_UPNP_C3
Local LAN ip address : 10.0.0.35
ExternalIPAddress = 192.168.1.11
AddPortMapping(8000, 8000, 10.0.0.35) failed with code 402 (Invalid Args)
GetSpecificPortMappingEntry() failed with code -1 (Miniupnpc Unknown Error)


I tried -r but still get "invalid args":
Code:
C:\Users\Stuffe>C:\Users\Stuffe\Desktop\asd2\upnpc-shared.exe -r 8000 TCP
upnpc : miniupnpc library test client. (c) 2005-2014 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://10.0.0.1:5000/Public_UPNP_gatedesc.xml
 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://10.0.0.1:5000/Public_UPNP_C3
Local LAN ip address : 10.0.0.35
ExternalIPAddress = 192.168.1.11
AddPortMapping(8000, 8000, 10.0.0.35) failed with code 402 (Invalid Args)
GetSpecificPortMappingEntry() failed with code -1 (Miniupnpc Unknown Error)


Here is the output from -l (port 8000 not there :/ )

Code:
C:\Users\Stuffe>C:\Users\Stuffe\Desktop\asd2\upnpc-shared.exe -l
upnpc : miniupnpc library test client. (c) 2005-2014 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://10.0.0.1:5000/Public_UPNP_gatedesc.xml
 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://10.0.0.1:5000/Public_UPNP_C3
Local LAN ip address : 10.0.0.35
Connection Type : IP_Routed
Status : Connected, uptime=5372645s, LastConnectionError : ERROR_NONE
  Time started : Fri Nov 28 15:43:03 2014
MaxBitRateDown : 100000000 bps (100.0 Mbps)   MaxBitRateUp 100000000 bps (100.0
Mbps)
ExternalIPAddress = 192.168.1.11
 i protocol exPort->inAddr:inPort description remoteHost leaseTime
 0 UDP  9308->10.0.0.26:9308  '10.0.0.26:9308 to 9308 (UDP)' '' 0
 1 UDP  3074->10.0.0.26:3074  'DemonwarePortMapping' '' 0
 2 UDP 33756->10.0.0.18:33756 'Skype UDP at 10.0.0.18:33756 (2888)' '' 0
 3 TCP 33756->10.0.0.18:33756 'Skype TCP at 10.0.0.18:33756 (2888)' '' 0
 4 TCP 55769->10.0.0.16:55769 'uTorrent (TCP)' '' 0
 5 UDP 55769->10.0.0.16:55769 'uTorrent (UDP)' '' 0
 6 UDP 59406->10.0.0.16:59406 'Teredo' '' 0
 7 UDP 57936->10.0.0.16:57936 'Teredo' '' 0
 8 UDP 64945->10.0.0.16:64945 'Teredo' '' 0
 9 UDP 53687->10.0.0.16:53687 'Teredo' '' 0
10 UDP 58901->10.0.0.16:58901 'Teredo' '' 0
11 UDP 57455->10.0.0.16:57455 'Teredo' '' 0
12 UDP 54651->10.0.0.16:54651 'Teredo' '' 0
13 UDP 62569->10.0.0.16:62569 'Teredo' '' 0
14 UDP 49660->10.0.0.16:49660 'Teredo' '' 0
15 UDP 54139->10.0.0.16:54139 'Teredo' '' 0
16 UDP 63890->10.0.0.16:63890 'Teredo' '' 0
17 UDP 51094->10.0.0.16:51094 'Teredo' '' 0
18 UDP 57874->10.0.0.16:57874 'Teredo' '' 0
19 UDP 62316->10.0.0.16:62316 'Teredo' '' 0
20 UDP 50949->10.0.0.16:50949 'Teredo' '' 0
21 UDP 60308->10.0.0.16:60308 'Teredo' '' 0
22 UDP 54466->10.0.0.16:54466 'Teredo' '' 0
23 UDP 54199->10.0.0.16:54199 'Teredo' '' 0
24 UDP 53947->10.0.0.16:53947 'Teredo' '' 0
25 UDP 50456->10.0.0.16:50456 'Teredo' '' 0
26 UDP 59443->10.0.0.16:59443 'Teredo' '' 0
27 UDP 55683->10.0.0.16:55683 'Teredo' '' 0
28 UDP 56775->10.0.0.16:56775 'Teredo' '' 0
29 UDP 58270->10.0.0.16:58270 'Teredo' '' 0
30 UDP 55046->10.0.0.16:55046 'Teredo' '' 0
31 UDP 58624->10.0.0.16:58624 'Teredo' '' 0
32 UDP 61424->10.0.0.16:61424 'Teredo' '' 0
33 UDP 13997->10.0.0.36:13997 'Skype UDP at 10.0.0.36:13997 (2922)' '' 0
34 TCP 13997->10.0.0.36:13997 'Skype TCP at 10.0.0.36:13997 (2922)' '' 0
35 UDP  9306->10.0.0.26:9306  '10.0.0.26:9306 to 9306 (UDP)' '' 0
36 UDP 54766->10.0.0.4:54766 'Skype UDP at 10.0.0.4:54766 (2928)' '' 0
37 TCP 54766->10.0.0.4:54766 'Skype TCP at 10.0.0.4:54766 (2928)' '' 0
38 UDP  9307->10.0.0.26:9307  '10.0.0.26:9307 to 9307 (UDP)' '' 0
39 UDP  3659->10.0.0.26:3659  'EA Tunnel' '' 0
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Fri Jan 30, 2015 2:10 pm    Post subject: Reply with quote

I don't know what is your router and what UPnP IGD implementation it uses, but it is problably buggy and not accepting more than 40 simultaneous UPnP Port mappings.
Please remove one (I think "teredo" portmappings are useless/outdated) and try again
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation 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.