ssh upnp

First, see if your router supports upnp
upnpc -l

You should see something like

upnpc : miniupnpc library test client. (c) 2005-2014 Thomas Bernard
Go to or
for more information.
List of UPNP devices found on the network :
 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

On the target machine, open an imcomming path 

upnpc -a 22 3333 tcp

a new list will show

 3 TCP  3333->    'libminiupnpc' '' 0

When done, delete the mapping with 

upnpc -d 3333 TCP

Here's a handy one-liner

upnpc -a `ifconfig eno1 | grep "inet addr" | cut -d : -f 2 | cut -d " " -f 1` 22 2222 TCP

You can also tak to the server directly and skip the discovery which relies on auto-discovery broadcasts

So you'd delete any existing port forward for that port, as it may be going to an old DHCP lease (or someone else)

    upnpc -u -d 25565 TCP

Then request it again

    upnpc -u -a (Your IPAddress) 25565 25565 TCP