Jump to content

Mapping ports *between* hosts in an environment


Hamsandwich

Recommended Posts

Hi wise ones,

Had a question. Is there a way to use nmap (or something else), to see which ports are available between hosts in a list or ip range. Note -- I am not talking about ports available from the perspective of a single host -- I mean between the actual hosts in the list themselves. For an example, I have an environment that has an apache proxy, a couple tomcat boxes, a couple mysql boxes. I'm looking for a map of the ports between these hosts... one-direction, 2-direction, etc. For example, is the proxy talking to the the tomcats? If so, which port? And the tomcats -- which ports do they access the proxy (if at all)?

I have access to each host -- I am looking for a quick means to get a summary of port access based on firewall rules --- without having access to the firewall itself. I'm basically noticing some issues with some of my applications, and I want a summary of which ports each host can access within the environment, so I can have our network team modify the firewall rules.

I'm new to nmap... but other than logging into each host, and running nmap from the host in question to look at each other host in the list, what are my options? I was figuring on doing a nested for loop and running nmap that way... but that seemed lame. Was hoping for something more out of the box.

Seems like netstat and lsof -i also provide good info -- but I am looking for best approaches.

Hope my question made sense. Thanks for any assistance!

Link to comment
Share on other sites

On the host connected to the other host you can use netstat or lsof. just check the help files for the command that shows the program in use with the port/socket. Then pipe it through grep for the IP or Domain name of the second node afterwards. Externally would be kind of hard, since you can only really see what ports are open, but not so much WHO they are talking to, without 1, MITM, or 2, something like SNMP that reports back info for you, which honestly, netstat on one of the nodes to check connections and then grep for the second node, would show the communication between just those two.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...