Applications for port forwarding using UPnP

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Applications for port forwarding using UPnP

by Calinou » Sat Jan 05, 2013 20:44

Note that your router needs to have UPnP enabled.

UPnP-PortMapper

UPnP-PortMapper is a Java application which makes port forwarding easy. It works on Windows, OS X, Linux and *BSDs.

Note that your router must support UPnP and it must be enabled. On most routers, it is enabled by default.

Download link: here

Download it then run it with Java (right click > Open With > Java). On Linux, make sure it is executable -- if it is not, then type this after using the "cd" command to go to the folder where you placed the .jar file:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
chmod -v +x PortMapper-1.9.5.jar


upnpc

upnpc is a command-line tool for Linux and Windows. It can be found in distributions' repositories (at least for Debian/Ubuntu, probably other distributions too).

Download link for Windows: here

On Linux, just install it using your package manager.

Instructions:

Add port forwarding:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
upnpc -a <INTERNAL IP> 30000 30000 UDP

(you can see your internal IP with "ifconfig" on Linux, "ipconfig" on Windows)

List active port forwardings:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
upnpc -l


Remove a port forwarding:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
upnpc -d 30000 UDP
Last edited by Calinou on Tue Feb 26, 2013 20:56, edited 1 time in total.
 

User avatar
xyz
Member
 
Posts: 449
Joined: Thu Nov 10, 2011 14:25

by xyz » Sat Jan 05, 2013 21:54

The same can be achieved by entering this command:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
upnpc -a 192.168.1.26 30000 30000 UDP

without java or any other bloated shit.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Sat Jan 05, 2013 23:03

xyz wrote:The same can be achieved by entering this command:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
upnpc -a 192.168.1.26 30000 30000 UDP

without java or any other bloated shit.


Works too, but that's Linux-only (edit: nope, nevermind). Added to the topic, though.
Last edited by Calinou on Sat Jan 26, 2013 21:31, edited 1 time in total.
 

tux_peng
Member
 
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Sat Jan 05, 2013 23:12

It is better to do port forwarding in your router, and not deal with uPnp; but this is nice...
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info
 

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52

by InfinityProject » Sat Feb 02, 2013 03:09

Using UPnP-PortMapper, I got this error:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Could not add port mapping: Detailed error code:402, Detailed error description :InvalidArgs

I followed the instructions exactly like you said.
I run windows 7.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Sat Feb 02, 2013 12:20

InfinityProject wrote:Using UPnP-PortMapper, I got this error:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Could not add port mapping: Detailed error code:402, Detailed error description :InvalidArgs

I followed the instructions exactly like you said.
I run windows 7.


"InvalidArgs"... maybe some argument in your port forwarding preset was empty or invalid (eg. a word instead of a number as port). Or your router doesn't have UPnP enabled.
 

User avatar
RabbiBob
Member
 
Posts: 335
Joined: Sat Jan 28, 2012 22:40

by RabbiBob » Sat Feb 02, 2013 12:58

tux_peng wrote:It is better to do port forwarding in your router, and not deal with uPnp; but this is nice...


For the security conscious, see show 389 of Security Now. Within the first 3:30 I was aghast at the number of vulnerable routers out there.

http://www.grc.com/securitynow.htm <- mp3 download available
http://twit.tv/show/security-now/389
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Sat Feb 02, 2013 17:57

RabbiBob wrote:http://www.grc.com/securitynow.htm <- mp3 download available


>security
>mp3

It's not possible for someone from the Internet to port forward unless you've got some malicious software on your machine. And as always... crackers have better things to do.
Last edited by Calinou on Sat Feb 02, 2013 17:58, edited 1 time in total.
 

User avatar
RabbiBob
Member
 
Posts: 335
Joined: Sat Jan 28, 2012 22:40

by RabbiBob » Sat Feb 02, 2013 21:26

Calinou wrote:
RabbiBob wrote:http://www.grc.com/securitynow.htm <- mp3 download available


>security
>mp3

It's not possible for someone from the Internet to port forward unless you've got some malicious software on your machine. And as always... crackers have better things to do.


Port forwarding isn't the issue, it's a vulnerability in the uPNP protocol that allows the device to be compromised. H.D. Moore has a paper out on it last Tuesday outlining the issue and how many devices were found to be open to the issue during a five month scan of the Internet:

https://community.rapid7.com/community/infosec/blog/2013/01/29/security-flaws-in-universal-plug-and-play-unplug-dont-play

We've known for a couple of years how much upnp swiss cheese's a router, but not to this extent until last week.
 


Return to Minetest Servers

Who is online

Users browsing this forum: No registered users and 65 guests

cron