LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-13-2013, 12:35 AM   #1
yahoosam
Member
 
Registered: Jun 2012
Posts: 79

Rep: Reputation: Disabled
Examine to find 18000 port availability on different random servers


How to Examine to find 18000 port availability on different random servers..
any programming ways in c..Any assistence
Code:
suppose server list be :

192.168.1.1
192.168.1.2
192.168.1.3
.
.
192.168.1.100
Thanks in Advance
 
Old 02-13-2013, 12:41 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,927

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
do you know the program nmap?
 
Old 02-13-2013, 12:42 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Port scanning is not likely to make you particularly popular with the local network admins (and depending on the motivations behind it, may be off limits topic wise for this forum). If you have a legitimate need to monitor services on remote systems, I'd suggest looking into Nagios or similar.
 
Old 02-13-2013, 01:05 AM   #4
yahoosam
Member
 
Registered: Jun 2012
Posts: 79

Original Poster
Rep: Reputation: Disabled
ya similar wise i need to check a port availability on different remote servers..
can you assist me any ways
 
Old 02-13-2013, 07:10 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, nmap is quite smart; you just specify port num to check using -p http://nmap.org/book/man-briefoptions.html.
That shouldn't upset anyone, assuming you should be doing this, although letting the local admins know is a good idea.
 
Old 02-13-2013, 10:16 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Definitely nmap is the way to go to just test if a port is open. You can use the -iL option to specify a list of hosts to scan. Nagios can do somewhat more detailed service checks, but its use may well be overkill for what you describe.
 
Old 02-14-2013, 11:29 PM   #7
yahoosam
Member
 
Registered: Jun 2012
Posts: 79

Original Poster
Rep: Reputation: Disabled
thanks very much for your important contribution of time..

i had one response on it.
in case of "nmap" and other tools we need to install another software package,which makes idea more dependent on other packages.
can we have any inbuilt mechanism to solve this through C programming using socket and all..

actually to get a response from other sockets we need to create socket on remote servers,responding to my client request.
that again makes complex.
so more or less "Is there any method to ping on remote servers checking specific IP free or not"

Thanks in advance
 
Old 02-14-2013, 11:58 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Do you know what service/protocol should be listening on 18000 at the remote sites?
If so, you can probably craft a simple client to check.
Otherwise try a simple telnet cxn and see what response you get.
Of course, it'd be simpler and more reliable to just ask the admins
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
port availability- linux redhat 5 vicky007aggrwal Linux - Newbie 11 03-12-2013 01:18 PM
LXer: File Servers - The Business Case for High Availability LXer Syndicated Linux News 0 09-13-2011 11:50 PM
LXer: Load-Balanced High-Availability Web Cluster With 2 Xen Servers On Ubuntu 8.04 LXer Syndicated Linux News 0 10-12-2008 12:30 PM
High Availability Squid Cache Servers? jimbo1954 Linux - Networking 3 09-15-2008 01:14 PM
High Availability & Linux Virtual Servers....???? crosaire Slackware 1 01-10-2007 02:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration