kaklakariada / portmapper

A tool for managing port forwardings via UPnP
GNU General Public License v3.0
685 stars 89 forks source link

Portmapper says "1 port mapping added successfully" but nmap port scan fails #32

Closed m00nwtchr closed 6 years ago

m00nwtchr commented 6 years ago

Hello i am trying to port forward a minecraft server (port 25565) but my router has no "port forwarding" option (atleast not without calling customer support and all that nonsense) so i tried using portmapper. Everything seems to work but i still cant connect thru the game and nmap scan fails. Here is the portmapper log:

DEBUG Loading settings from file settings.xml
DEBUG Got settings [Settings: presets=[MC, test], useEntityEncoding=true, logLevel=TRACE, routerFactoryClassName=org.chris.portmapper.router.weupnp.WeUPnPRouterFactory]
DEBUG Open Settings dialog
DEBUG Create settings dialog
DEBUG Use entity encoding is true
TRACE Connecting to router...
INFO  Creating router factory for class org.chris.portmapper.router.weupnp.WeUPnPRouterFactory
DEBUG Router factory weupnp lib created
INFO  Searching for routers...
DEBUG System property 'portmapper.locationUrl' not defined: discover routers automatically.
DEBUG Searching for gateway devices...
INFO  Connected to router 'Compal Broadband Networks, Inc CH7465LG'
TRACE Updating addresses...
TRACE Updating port mappings...
DEBUG Getting port mapping 0...
DEBUG Got port mapping 0: org.bitlet.weupnp.PortMappingEntry@6819975f
DEBUG Getting port mapping 1...
DEBUG Got an exception with message 'null‘ for index 1, stop getting more mappings
DEBUG Got null port mapping for index 1
INFO  Found 1 mappings
TRACE done
DEBUG Connection state changed to true
INFO  Router Info: friendlyName     = Compal Broadband Networks, Inc CH7465LG
INFO  Router Info: manufacturer     = Compal Broadband Networks, Inc
INFO  Router Info: modelDescription     =  CH7465LG
INFO  def loc: http://192.168.0.1:5000/rootDesc.xml
INFO  device type: urn:schemas-upnp-org:device:WANConnectionDevice:1
TRACE Selection of preset list has changed: true
TRACE Selection of preset list has changed: true
INFO  Removing mapping MC
INFO  Mapping was removed successfully: MC
DEBUG Getting port mapping 0...
DEBUG Got an exception with message 'null‘ for index 0, stop getting more mappings
DEBUG Got null port mapping for index 0
INFO  Found 0 mappings
DEBUG Connected to router, get IP of localhost from socket...
DEBUG Get IP of localhost
DEBUG Got internal router port 5000
DEBUG Creating socket to router: 192.168.0.1:5000...
DEBUG Got address /192.168.0.234 from socket.
INFO  1 port mapping added successfully
DEBUG Getting port mapping 0...
DEBUG Got port mapping 0: org.bitlet.weupnp.PortMappingEntry@31a39344
DEBUG Getting port mapping 1...
DEBUG Got an exception with message 'null‘ for index 1, stop getting more mappings
DEBUG Got null port mapping for index 1
INFO  Found 1 mappings
DEBUG Connected to router, get IP of localhost from socket...
DEBUG Get IP of localhost
DEBUG Got internal router port 5000
DEBUG Creating socket to router: 192.168.0.1:5000...
DEBUG Got address /192.168.0.234 from socket.
INFO  1 port mapping added successfully
DEBUG Getting port mapping 0...
DEBUG Got port mapping 0: org.bitlet.weupnp.PortMappingEntry@69b2b7ed
DEBUG Getting port mapping 1...
DEBUG Got an exception with message 'null‘ for index 1, stop getting more mappings
DEBUG Got null port mapping for index 1
INFO  Found 1 mappings

and the nmap output

Starting Nmap 7.40 ( https://nmap.org ) at 2018-02-25 21:17 ?rodkowoeuropejski czas stand.
Initiating Parallel DNS resolution of 1 host. at 21:18
Completed Parallel DNS resolution of 1 host. at 21:18, 0.00s elapsed
Initiating SYN Stealth Scan at 21:18
Scanning 89-64-26-54.dynamic.chello.pl (89.64.26.54) [1 port]
Completed SYN Stealth Scan at 21:18, 2.85s elapsed (1 total ports)
Initiating OS detection (try #1) against 89-64-26-54.dynamic.chello.pl (89.64.26.54)
Retrying OS detection (try #2) against 89-64-26-54.dynamic.chello.pl (89.64.26.54)
Nmap scan report for 89-64-26-54.dynamic.chello.pl (89.64.26.54)
Host is up.
PORT      STATE    SERVICE
25565/tcp filtered minecraft
Too many fingerprints match this host to give specific OS details

Read data files from: C:\Program Files (x86)\Nmap
OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 17.94 seconds
           Raw packets sent: 50 (6.760KB) | Rcvd: 16 (2.608KB)

Nmap cmd line: nmap -v -p 25565 -Pn -O 89.64.26.54 89.64.26.54 is my public ip address (dynamic ip)

ISP: UPC Router: UPC Connect Box CH7465LG-LC

kaklakariada commented 6 years ago

From where do you try to connect/run nmap? I guess connecting to your server/scanning with nmap from inside your network using the public IP won't work. Try to scan your public IP from a remote machine or ask a friend to do it.

m00nwtchr commented 6 years ago

@kaklakariada nope same thing happening

kaklakariada commented 6 years ago

Maybe your router just reports the port mapping via UPnP without really activating it? Maybe there is a firmware update for your router that fixes this?