Go to file
kaklakariada 17a5908475 switch license to gpl v3 2015-11-08 17:14:33 +01:00
.settings build using command line gradlew, remove eclipse gradle config files 2015-04-10 12:25:28 +02:00
config build using command line gradlew, remove eclipse gradle config files 2015-04-10 12:25:28 +02:00
gradle upgrade gradle wrapper from 2.3 to 2.5 2015-08-01 14:53:50 +02:00
lib replaced ant with gradle 2013-07-14 13:14:24 +00:00
src Deleted j.u.l config file as it is not needed any more 2015-04-11 19:31:02 +02:00
.gitignore cleanup .gitignore 2014-11-08 15:42:35 +01:00
.project use eclipse plugin in gradle for generating eclipse config files 2014-11-08 12:53:27 +01:00
.travis.yml use sudo: false to use new travis infrastructure 2015-08-01 14:41:19 +02:00
LICENSE switch license to gpl v3 2015-11-08 17:14:33 +01:00
README.md fixed layout, added download buttons 2015-04-10 21:20:25 +02:00
build.gradle Increment version to 2.0.0-alpha2 2015-04-11 19:31:19 +02:00
gradlew add gradle wrapper script for gradle 1.9 2013-11-23 17:39:03 +01:00
gradlew.bat add gradle wrapper script for gradle 1.9 2013-11-23 17:39:03 +01:00

README.md

UPnP PortMapper

Build Status Download UPnP PortMapper

UPnP PortMapper is an easy to use program that manages the port mappings (port forwarding) of a UPnP enabled internet gateway device (router) in the local network. You can easily view, add and remove port mappings.

Using port forwarding, it is possible to access servers (SSH, Web, Game servers, ...) running in a private network from the internet. Port mappings can be configured using the web administration interface of a router, but using the UPnP PortMapper is much more convenient: Just create a new preset or select an existing preset and click one button to add a port mapping for your current computer, the IP address is retrieved automatically!

The interface is written in English and German. PortMapper automatically selects the language according your operating system.

Download

Download UPnP PortMapper

Download binaries from SourceForge. UPnP PortMapper requires Java 7 or later. You can download it at java.com.

Usage

To run PortMapper, double click on the JAR file or run

$ java -jar PortMapper-1.9.6.jar

on the command line.

PortMapper also has a command line interface. You can see the available options by adding parameter -h:

$ java -jar PortMapper.jar -h
 -add                  : Add a new port mapping
 -delete               : Delete a new port mapping
 -description VAL      : Description of the port mapping
 -externalPort N       : External port of the port mapping
 -gui                  : Start graphical user interface
 -h (-help)            : Print usage help
 -info                 : Print router info
 -internalPort N       : Internal port of the port mapping
 -ip VAL               : Internal IP of the port mapping (default: localhost)
 -lib VAL              : UPnP library to use
 -list                 : Print existing port mappings
 -protocol [TCP | UDP] : Protocol of the port mapping
 -routerIndex N        : Router index if more than one is found (zero-based)

Examples

  • Create a new port mapping for a specific IP address

java -jar PortMapper.jar -add -externalPort <port> -internalPort <port> -ip <ip-addr> -protocol tcp

  • Create a new port mapping for the local machine (just omit the IP)

java -jar PortMapper.jar -add -externalPort <port> -internalPort <port> -protocol tcp

  • Delete a port forwarding

java -jar PortMapper.jar -delete -externalPort <port> -protocol tcp

  • List existing port forwardings

java -jar PortMapper.jar -list

UPnP libraries

PortMapper includes three third party UPnP libraries. If the default does not work for your device, try using a different library.

  • Cling: org.chris.portmapper.router.cling.ClingRouterFactory (default)
  • weupnp: org.chris.portmapper.router.weupnp.WeUPnPRouterFactory
  • SBBI UPnP lib: org.chris.portmapper.router.sbbi.SBBIRouterFactory
  • org.chris.portmapper.router.dummy.DummyRouterFactory (for testing)

Known issues

  • Under Ubuntu Linux it is not possible to retrieve the IP address of the local host, the address must be entered manually.

Building

Build PortMapper on the command line:

$ git clone https://github.com/kaklakariada/portmapper.git
$ cd portmapper
$ ./gradlew build
$ java -jar build/libs/portmapper-*.jar

Developing using Eclipse

Generate Eclipse project files:

$ ./gradlew eclipse

Then import the project into your Eclipse workspace.

Participate

Your feedback is most welcome at the project page:

  • Found a bug? Create an issue!
  • Miss some important feature? Create an issue!
  • Need help using the UPnP PortMapper? Post a message in the Forum!
  • Want to help with developing? Contact me via SourceForge.net!
  • Want to send me a mail? Use christoph at users.sourceforge.net!