Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When connected to VPN (I have used OpenVPN and TunnelBear VPN service) nmap stops working. Ping, nc and other network tools work however nmap doesnt.

When not running vpn, I get:

$ sudo nmap 8.8.8.8

    Starting Nmap 5.51 ( http://nmap.org ) at 2011-12-07 15:38 CST
    Nmap scan report for google-public-dns-a.google.com (8.8.8.8)
    Host is up (0.082s latency).
    Not shown: 998 filtered ports
    PORT    STATE  SERVICE
    53/tcp  open   domain
    113/tcp closed auth

When running over vpn, I get the following:

$ sudo nmap 8.8.8.8

    Starting Nmap 5.51 ( http://nmap.org ) at 2011-12-07 15:08 CST
    Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
    Nmap done: 1 IP address (0 hosts up) scanned in 3.07 seconds

It is like nmap loses the traffic. Doing tcpdump captures shows that the traffic is making it back to the box.

Any mac osx, OpenVPN or nmap experts have an idea?

I am using the latest macports nmap...

share|improve this question
    
Have tried sudo nmap 8.8.8.8 -e tun0 and it fails. –  wickett Dec 7 '11 at 23:29
    
Have verified that while on vpn, I can ping 8.8.8.8 and telnet 8.8.8.8 53 but nmap still shows the same as above –  wickett Dec 7 '11 at 23:30
    
Please show us the routing table sudo route -n? –  quanta Dec 8 '11 at 4:35
add comment

1 Answer

Try adding the nmap -e option to the command line to specify the interface to use. For example, if tun0 is the VPN interface, then do:

% nmap -e tun0  (plus whatever options) target_IPs
  • -e : Use specified interface
share|improve this answer
    
Sadly, same output as if not specifying the interface... –  wickett Dec 7 '11 at 23:28
    
I just tested my setup, which is: Lion + OpenVPN connecting to Linode cloud VM running CentOS. Doing a connect() scan will work: % sudo nmap -sT -e tun0 -T5 -P0 <target_IP> (i.e. -sT = TCP connect scan vs TCP SYN scan, avoiding raw packets). Checking what is supported... –  Tate Hansen Dec 8 '11 at 1:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.