Test Connection to hosts | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Test Connection to hosts

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-06-2012
SkySmart SkySmart is offline
Registered User
 
Join Date: Dec 2006
Last Activity: 17 April 2014, 3:22 PM EDT
Posts: 583
Thanks: 340
Thanked 2 Times in 2 Posts
Test Connection to hosts

i have about 3500 hosts/devices which i monitor.

i monitor them from one host. we'll call this one host HOSTA. HOSTA has connectivity to all 3500 hosts/devices.

now, i have to create a backup for HOSTA. and the back up is in another state.

how do i get a list of all open ports on HOSTA so I can have them replicated on HOSTB?

please keep in mind, i wont be the one making the actual change. i just need to have the information ready to give to the necessary personnel that will be setting it up.

so the options i have in mind are:


Code:
nmap OR
netcat (nc)

how can i use either of these two commands to get all open ports that HOSTA can connect to on all 3500 hosts/devices?

for example:

lets say one of the 3500 hosts/devices i monitor is called merchant-01.skysmart.net

i'm hoping there will be a command similar to this:


Code:
nmap HOSTA merchant-01.skysmart.net

what i'll be expecting the aforementioned command to do is get me a list of ALL OPEN ports that HOSTA can connect to on merchant-01.skysmart.net. when i say all, i mean all. udp, tcp, whichever.

any ideas?

os: Linux Red Hat/SunOS
Sponsored Links
    #2  
Old 10-07-2012
bakunin bakunin is online now Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 18 April 2014, 9:02 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 3,919
Thanks: 39
Thanked 671 Times in 533 Posts
I don't understand what exactly you are after. Knowing a list of open ports will help you not at all in getting what you said you want and you can't "copy" this in any way.

If you want to guarantee simple IP connectivity the new host just has to be in the same subnet than the old one. That is: HOSTB has to share the IP subnet with HOSTA. Then it is copying the routing information of HOSTA (issue "netstat -rn" to get this information) and you should be done.

Further complications would arise if there are firewalls within your network: You will have to adapt their rules, but this can only be done on the firewall systems themselves, neither on HOSTA nor HOSTB.

If you need a certain protocol to work you will have to make sure all the prerequisites are met. For instance, if you want "ssh" to work (probably without further authentification) you will have to make sure the "sshd" configuration is in place ("/etc/sshd_config") and the keys are exchanged (as per default "~/.ssh/authorized_keys", "~/.ssh/known_hosts"). Still, you won't need any list of open ports for this.

Of course you could use "nmap" consecutively on all your hosts to find out open ports, but it would be probably easier to use "netstat" locally on each of them , as you claim to have HOSTA having connectivity to all of them (whatever this means - pingable? exchanged ssh-keys? something else?). Still, what will that information help you? Definitely not in building HOSTB, because there is nothing you could configure in HOSTB based on this information.

I hope this helps.

bakunin

Last edited by bakunin; 10-07-2012 at 04:11 AM..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bash script to test network connection - please help shadow_boi Shell Programming and Scripting 2 09-21-2009 03:25 AM
Need help to make connection to various hosts anjum.suri Shell Programming and Scripting 3 09-04-2009 10:58 AM
Connection Test Script princeboot Shell Programming and Scripting 1 08-19-2009 03:44 PM
Database Connection test in unix Script ali560045 Shell Programming and Scripting 3 06-30-2009 09:31 AM
How to Create a shell script to test the telnet connection status yhcheong Shell Programming and Scripting 16 03-19-2009 11:33 AM



All times are GMT -4. The time now is 09:08 AM.