Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to find whether a particular ip:port is available??

Reply
Thread Tools Display Modes

How to find whether a particular ip:port is available??

 
 
Amitava Bhattacharyya
Guest
Posts: n/a

 
      08-27-2004, 09:46 AM
Hello,

I would like to write a program that checks whether a set of iport
combinations are available or not (basically a lan proxy checker). Its
a gui app (using Qt), so I don't want to use blocking sockets. Could
someone please help me in this regard -- ie, how should I go about it?
Qt based advice would be most helpful.
Thanks in advance,

Amitava
 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      08-27-2004, 02:29 PM
Amitava Bhattacharyya wrote:
> Hello,
>
> I would like to write a program that checks whether a set of iport
> combinations are available or not (basically a lan proxy checker). Its
> a gui app (using Qt), so I don't want to use blocking sockets. Could
> someone please help me in this regard -- ie, how should I go about it?
> Qt based advice would be most helpful.
> Thanks in advance,



Please specify a little more exactly:

- Are you intending to check the availability on the machine
the software is running on, or want to probe another computer
in the network?

- Would you like to check for TCP ports or UDP ports or both?

I think that it's not in the interests of the Net community to
give detailed instructions for building cracking tools.

Tauno Voipio
tauno voipio (at) iki fi


 
Reply With Quote
 
Amitava Bhattacharyya
Guest
Posts: n/a

 
      08-28-2004, 08:37 AM
Hello,

The situation is like this:
In our college lan, there are a number of web proxy servers, needed
when a direct connection to the net is not available. All these proxy
servers are not up all the time, so we need to check which are active
before specifying browser proxy settings. We have a list of proxy
server ips and ports, and I wish to write a program which would show
me which ones are up. No cracking tools here!
Thanks.

Tauno Voipio <(E-Mail Removed)> wrote in message news:<mzHXc.269$(E-Mail Removed)>...
> Amitava Bhattacharyya wrote:
> > Hello,
> >
> > I would like to write a program that checks whether a set of iport
> > combinations are available or not (basically a lan proxy checker). Its
> > a gui app (using Qt), so I don't want to use blocking sockets. Could
> > someone please help me in this regard -- ie, how should I go about it?
> > Qt based advice would be most helpful.
> > Thanks in advance,

>
>
> Please specify a little more exactly:
>
> - Are you intending to check the availability on the machine
> the software is running on, or want to probe another computer
> in the network?
>
> - Would you like to check for TCP ports or UDP ports or both?
>
> I think that it's not in the interests of the Net community to
> give detailed instructions for building cracking tools.
>
> Tauno Voipio
> tauno voipio (at) iki fi

 
Reply With Quote
 
Robert E A Harvey
Guest
Posts: n/a

 
      08-28-2004, 02:02 PM
(E-Mail Removed) (Amitava Bhattacharyya) wrote in message news:<(E-Mail Removed). com>...
> Hello,
>
> The situation is like this:
> In our college lan, there are a number of web proxy servers, needed
> when a direct connection to the net is not available. All these proxy
> servers are not up all the time, so we need to check which are active
> before specifying browser proxy settings. We have a list of proxy
> server ips and ports, and I wish to write a program which would show
> me which ones are up. No cracking tools here!
> Thanks.


I'm not in a position to try it, but my first thought would be to set
up something like squid, pointing to all the real proxy servers as
peer_cache entries, and then point the user to the new copy of squid.
That sbould fight it all out without having to alter anything, surely?

Maybe you will have to mark them all as parents too?
 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      08-28-2004, 09:20 PM
Amitava Bhattacharyya wrote:
> Hello,
>
> The situation is like this:
> In our college lan, there are a number of web proxy servers, needed
> when a direct connection to the net is not available. All these proxy
> servers are not up all the time, so we need to check which are active
> before specifying browser proxy settings. We have a list of proxy
> server ips and ports, and I wish to write a program which would show
> me which ones are up. No cracking tools here!


> Thanks.
>


I see.

So you need a way to look if a TCP server is responding. The
way is to initiate a TCP connection and terminate it at once.
If the connection is accepted, the server is up.

There is a tool: nmap which can do this for you if you are
not going to code your own tool.

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
Walter Schiessberg
Guest
Posts: n/a

 
      08-28-2004, 09:56 PM
Amitava Bhattacharyya wrote on 27.08.2004 11:46:

> Hello,
>
> I would like to write a program that checks whether a set of iport
> combinations are available or not (basically a lan proxy checker). Its
> a gui app (using Qt), so I don't want to use blocking sockets. Could
> someone please help me in this regard -- ie, how should I go about it?
> Qt based advice would be most helpful.
> Thanks in advance,


You might want to look at hping <http://www.hping.org/>

#hping <destination> -c 1 -S -p <port>

This would send one SYN packet to <port> on <destination>. If it is
open, you'll get flags=SA, otherwise flags=RA.

HTH

Walter
 
Reply With Quote
 
Jeroen Geilman
Guest
Posts: n/a

 
      08-30-2004, 07:32 PM
Amitava Bhattacharyya wrote:

> Hello,
>
> The situation is like this:
> In our college lan, there are a number of web proxy servers, needed
> when a direct connection to the net is not available. All these proxy
> servers are not up all the time, so we need to check which are active
> before specifying browser proxy settings.


Nonsense.
Set up proper DNS forwarding and use hostnames instead of addresses.


--
J

All your bits are belong to us - again.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How many NIC for a event photography viewing system, advantages ofQuad Port (4-port) NICs sam Windows Networking 1 03-17-2008 12:51 PM
Socket connection to port fails despite port open / listening ! Jack Linux Networking 2 12-19-2007 03:46 PM
Can't find process for port andrew.bell.ia@gmail.com Linux Networking 2 02-23-2006 09:23 PM
How do you ping a server to find out if it is listening on a specific port Matt Windows Networking 1 12-01-2003 06:02 PM
How do i find out which port numbers a specific application is using on my computer ? Lasse K. Christiansen Linux Networking 3 07-04-2003 01:25 AM



1 2 3 4 5 6 7 8 9 10 11