Home page logo
/
Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News

Sponsors


File nat-pmp-mapport

Script types: portrule
Categories: discovery, safe
Download: http://nmap.org/svn/scripts/nat-pmp-mapport.nse

User Summary

Maps a WAN port on the router to a local port on the client using the NAT Port Mapping Protocol (NAT-PMP). It supports the following operations: o map - maps a new external port on the router to an internal port of the requesting IP o unmap - unmaps a previously mapped port for the requesting IP o unmapall - unmaps all previously mapped ports for the requesting IP

Script Arguments

nat-pmp-mapport.op

operation, can be either map, unmap or unmap all o map allows you to map an external port to an internal port of the calling IP o unmap removes the external port mapping for the specified ports and protocol o unmapall removes all mappings for the specified protocol and calling IP

nat-pmp-mapport.protocol

the protocol to map, can be either tcp or udp.

nat-pmp-mapport.privport

the internal port of the calling IP to map requests to. This port will receive all requests coming in to the external port on the router.

nat-pmp-mapport.pubport

the external port to map on the router. The specified port is treated as the requested port. If the port is available it will be allocated to the caller, otherwise the router will simply choose another port, create the mapping and return the resulting port.

nat-pmp-mapport.lifetime

the lifetime of the mapping in seconds (default: 3600)

Example Usage

nmap -sU -p 5351 <ip> --script nat-pmp-mapport --script-args='op=map,pubport=8080,privport=8080,protocol=tcp'
nmap -sU -p 5351 <ip> --script nat-pmp-mapport --script-args='op=unmap,pubport=8080,privport=8080,protocol=tcp'
nmap -sU -p 5351 <ip> --script nat-pmp-mapport --script-args='op=unmapall,protocol=tcp'

Script Output

PORT     STATE SERVICE
5351/udp open  nat-pmp
| nat-pmp-mapport:
|_  Successfully mapped tcp 1.2.3.4:8080 -> 192.168.0.100:80

Requires


Author: Patrik Karlsson

License: Same as Nmap--See http://nmap.org/book/man-legal.html

Nmap Site Navigation

Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault