Application/commands to test port forwarding?

Discussion in 'Mac OS X Server, Xserve, and Networking' started by super_kev, Oct 7, 2008.

  1. super_kev macrumors 6502

    super_kev

    Joined:
    Jan 12, 2005
    Location:
    USofA
    #1
    I'm curious if there is an app (or terminal commands) out there that will respond to certain port to let the other side know that the port is active?

    For example, I'm having a tough time trying to figure out if the router I'm using is at fault, or if there is some quirk in the system that's not allowing the data through. If I can have an application on Mac #1 (behind the router in question) that I can dial in a port to force the computer to respond to (even if there is no service that is asking for that port), that would be great. Then I can telnet the IP and port of Mac #1 from outside the network on Mac #2 to see if the router is forwarding the port correctly. It's doing other ports except this one (3306) so I'm trying to figure out what's going on.

    Thanks.
     
  2. belvdr macrumors 601

    Joined:
    Aug 15, 2005
    #2
    If it's TCP 3306, then do a:
    Code:
    telnet <IP> 3306
    
    using the internal IP on the internal network, then do the same with the external IP from the external network. If it works on the internal, but doesn't connect from the external, your port forwarding setup is not working.

    If it is UDP 3306, use nmap to scan for that port:
    Code:
    nmap -p 3306 -u <IP>
    
    using both the internal IP and external IP as in the TCP test above.
     
  3. super_kev thread starter macrumors 6502

    super_kev

    Joined:
    Jan 12, 2005
    Location:
    USofA
    #3
    Thanks.

    Does OS X normally block outside network IP address from connecting to port 3306 (MySQL)?
     
  4. belvdr macrumors 601

    Joined:
    Aug 15, 2005
    #4
    It would only block the port entirely, not based on source address.
     
  5. lentife macrumors member

    lentife

    Joined:
    Dec 27, 2007
    Location:
    Rome, Italy
    #5
    Hi!
    I tried the nmap command in terminal and it said:
    -bash: nmap: command not found

    What can I do if I want to test some TCP ports of my router? I tried on some websites but somehow had not success. On my router, I opened the desired ports...
    thanks
     

Share This Page