Source Address (-S <IP_address>)
There may be instances where nmap cannot determine the local IP address of the station where it's running. When this happens, nmap will stop the scan and provide this message:
Unable to find appropriate source address and device interface to use when sending packets to XXX.XXX.XXX.XXX
If the local IP address is added to the nmap command line with the –S option, this message will not be displayed and the nmap scan will run normally.
As with the decoy option (-D), the source address option (-S) can be used to spoof the IP address of the nmap station. This can cause SYN flood problems for the remote device, so this spoofing process must be managed very carefully. If the local IP address will be spoofed, the interface option (-e) may be required, especially if the spoofed address belongs to a network to which the nmap station is not attached.
Interface (-e <interface>)
The interface option is used to force the nmap scan to use a specific hardware interface on the nmap station. If nmap is having problems determining which interface to use, it will provide this error message before quitting:
Unable to determine what interface to route packets through to XXX.XXX.XXX.XXX QUITTING!In POSIX-based systems, the interface name is the device name that can be seen using the ifconfig command. In Windows-based systems, the interface names aren't as standardized. Fortunately, nmap includes a method for Windows-based systems to retrieve the winpcap device name. The following command will list the available Windows interfaces:
> nmap --win_list_interfaces Available interfaces: Name Raw mode IP loopback0 SOCK_RAW 127.0.0.1 eth0 winpcap 192.168.0.5 >

