Sponsored Content
Full Discussion: Test Connection to hosts
Top Forums UNIX for Dummies Questions & Answers Test Connection to hosts Post 302711521 by SkySmart on Saturday 6th of October 2012 05:46:15 PM
Old 10-06-2012
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
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Create a shell script to test the telnet connection status

Hi friends, I'm newbie to shell script. I wanted to create a shell script which able to write a result for all the telnet connection status. For example, from this machine I want to test the telnet connection (total 100+ servers) with this machine. Any idea how to write this shell script?... (16 Replies)
Discussion started by: yhcheong
16 Replies

2. Shell Programming and Scripting

Database Connection test in unix Script

i have a unix script that gives me the sysdate from the database EDNAMID.WORLD.What i want my script to do the following 1) Establish a database connection 2) if database connection is successfull then echo the message "Connected" 3) put the o/p of the Sql query in a spool file 4) then... (3 Replies)
Discussion started by: ali560045
3 Replies

3. Shell Programming and Scripting

Connection Test Script

I am writing a script to do some conditional logic based on the results of a connection test. I need to capture the output of netcat, the 3 expected conditions are as follows. I need to capture the output of this command. I could write this to a file, but I would like to do it clearer if possible.... (1 Reply)
Discussion started by: princeboot
1 Replies

4. Shell Programming and Scripting

Need help to make connection to various hosts

Guys If someone could help me? Basically I want to connect from my central server and run the script to remote servers (in our environment we do not need a username/password to connect); like below ssh <server_name_1> /ora/rman/scripts/bk2.sh 2>/dev/null >> /tmp/an.log ssh <server_name_2>... (3 Replies)
Discussion started by: anjum.suri
3 Replies

5. Shell Programming and Scripting

bash script to test network connection - please help

I want to test if my host can connect to any of the following 10 hosts (192.168.1.0 to 192.168.1.9) I didnt know which command i should use, so i chose ping. (i wonder if i should use tracepath or sth else) my code is the following: #!/bin/bash clear firstPart="192.168.1" maxNum="9" ... (2 Replies)
Discussion started by: shadow_boi
2 Replies

6. UNIX for Dummies Questions & Answers

Test new DSN connection to sql server

I installed an odbc driver and created a DSN to connect to a sql server database on AIX 6. I want to know how to test the DSN from the command line. What syntax or commands do I use? ---------- Post updated at 11:44 AM ---------- Previous update was at 08:26 AM ---------- OK I figured out how... (9 Replies)
Discussion started by: Jdbrown239
9 Replies

7. UNIX for Dummies Questions & Answers

Shell Script to test telnet connection using port

Hello, I need to test telnet connections using port number for few hosts. Could you please help me? Thanks !! (1 Reply)
Discussion started by: skhichi
1 Replies

8. HP-UX

How can I test ldap connection to DC?

Hi all, Recently, I configured LDAP loadbalancing. So I need to test it from HPUX servers. But I don't know how to to it. I know many ldap connection tools such as ldap browser etc. But it's HPUX 11.31, so please share your practices. Thanks (1 Reply)
Discussion started by: sembii
1 Replies

9. Shell Programming and Scripting

Ssh to validate multiple remote hosts connection validation.

Dear Folks, I am trying to read a config file contains ip and port numbers. i want to read each line of the config file and check ssh connection is happening or not. Kindly guide. Config file: abc@1.2.342 22 abc@1.2.343 22 abc@1.2.344 22 abc@1.2.345 22... (9 Replies)
Discussion started by: sadique.manzar
9 Replies

10. Solaris

How to copy a tar file on a series of remote hosts and untar it on those hosts?

Am trying to copy a tar file onto a series of remote hosts and untar it at the destination. Need to do this without having to do multiple ssh. Actions to perform within a single ssh session via shell script - copy a file - untar at destination (remote host) OS : Linux RHEL6 (3 Replies)
Discussion started by: sankasu
3 Replies
GENLIST.MAN.1(1p)					User Contributed Perl Documentation					 GENLIST.MAN.1(1p)

NAME
Genlist - ping scanner SYNOPSIS
genlist [Input Type] [Scan Options] [General Options] DESCRIPTION
Genlist is a program that returns a list of hosts that responding to ping probes. Thus, this list can be used to perform an scan of these machines using PBNJ or Nmap. Apart of PBNJ 2.0 suite of tools to monitor changes on a network. OPTIONS
Usage: genlist [Input Type] [General Options] Input Type: -s --scan <target> Ping Target Range ex: 10.0.0.* Scan Options: -n --nmap <path> Path to Nmap executable --inter <interface> Perform scan using non default interface General Options: -v --version Display version -h --help Display this information Send Comments to Joshua D. Abraham ( jabra@ccs.neu.edu ) EXAMPLE OF GENLIST USED WITH PBNJ
$ ./genlist -s 10.0.0.* > iplist $ sudo ./scanpbnj -i iplist EXAMPLE OF GENLIST USED WITH NMAP
$ ./genlist -s 10.0.0.* > iplist $ sudo ./nmap -iL iplist INPUT TYPE
-s <target> Ping Target Range ex: 10.0.0.* The ping scan is a useful method of only scanning the host that are responding to ICMP echo requests. This scan basically takes the host that respond to ping and prints them. This is useful in combining the result with a PBNJ or Nmap scan because no time is wasted in scanning hosts that do not respond. SCAN OPTIONS
--interface <intface> This option sets an alternative interface for performing the scan. This is useful when you have multiple interfaces on a machine with restrictions on which devices can access certain IP ranges. -n --nmap <path> Use an alternative Nmap rather than Nmap located in the your path. This is useful if you have multiple version of Nmap installed on a system or if you are testing a new version of Nmap. Remember that if you are using a newly compiled version of Nmap that you need to export NMAPDIR to the location that Nmap was compiled in. Thus, if you have compiled Nmap in your homedir, use the following notation to run it with Genlist: $ export NMAPDIR=$HOME/nmap-VERSION/ $ sudo genlist -s 10.0.0.* --nmap $HOME/nmap-VERISON/ General Options: -v --version Prints the Genlist version number and exits. -h --help Display this information Prints a short help screen with the most common command flags. Running Genlist without any arguments does the same thing. FEATURE REQUESTS
Any feature requests should be reported to the online feature-request-tracking system available on the web at : http://sourceforge.net/tracker/?func=add&group_id=149390&atid=774489 Before requesting a feature, please check to see if the features has already been requested. BUG REPORTS
Any bugs found should be reported to the online bug-tracking system available on the web at : http://sourceforge.net/tracker/?func=add&group_id=149390&atid=774488. Before reporting bugs, please check to see if the bug has already been reported. When reporting PBNJ bugs, it is important to include a reliable way to reproduce the bug, version number of PBNJ and Nmap, OS name and version, and any relevant hardware specs. And of course, patches to rectify the bug are even better. SEE ALSO
scanpbnj(1) outputpbnj(1), nmap(1) AUTHORS
Joshua D. Abraham ( jabra@ccs.neu.edu ) LEGAL NOTICES
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html, or in the COPYING file included with PBNJ. It should also be noted that PBNJ has occasionally been known to crash poorly written applications, TCP/IP stacks, and even operating systems. While this is extremely rare, it is important to keep in mind. PBNJ should never be run against mission critical systems unless you are prepared to suffer downtime. We acknowledge here that PBNJ may crash your systems or networks and we disclaim all liability for any damage or problems PBNJ could cause. perl v5.8.8 2006-11-06 GENLIST.MAN.1(1p)
All times are GMT -4. The time now is 07:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy