Hi all,
I want to judge some remote hosts online or not quickly over WAN. I've
learned that ping command will not work in this case if the icmp ack
is blocked locally by firewall. Is it possiable for me to do this job
by perl codes?
Best regards.
--
..: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
|
|
0
|
|
|
|
Reply
|
Hongyi
|
12/4/2009 1:28:38 PM |
|
On Fri, 04 Dec 2009 21:28:38 +0800, Hongyi Zhao wrote:
> I want to judge some remote hosts online or not quickly over WAN. I've
> learned that ping command will not work in this case if the icmp ack is
> blocked locally by firewall. Is it possiable for me to do this job by
> perl codes?
Whatever it is that you or others will want to do with those remote hosts
if they are online, try that. If they're web servers, check port 80 etc.
For mail, port 25. Even if they were pingable wouldn't mean that the
desired services were running.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274
|
|
0
|
|
|
|
Reply
|
Peter
|
12/4/2009 2:13:50 PM
|
|
On Dec 4, 8:28=A0am, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
> Hi all,
>
> I want to judge some remote hosts online or not quickly over WAN. I've
> learned that ping command will not work in this case if the icmp ack
> is blocked locally by firewall. =A0Is it possiable for me to do this job
> by perl codes?
So the problem is that they are online but you aren't.
There is no valid reason to block ICMP packets.
|
|
0
|
|
|
|
Reply
|
smallpond
|
12/4/2009 4:37:51 PM
|
|
On Fri, 04 Dec 2009 21:28:38 +0800, Hongyi Zhao wrote:
> Hi all,
>
> I want to judge some remote hosts online or not quickly over WAN. I've
> learned that ping command will not work in this case if the icmp ack is
> blocked locally by firewall. Is it possiable for me to do this job by
> perl codes?
Try tcping, tcptrace or hping.
M4
|
|
0
|
|
|
|
Reply
|
Martijn
|
12/4/2009 4:49:19 PM
|
|
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> Hi all,
>
> I want to judge some remote hosts online or not quickly over WAN. I've
> learned that ping command will not work in this case if the icmp ack
> is blocked locally by firewall. Is it possiable for me to do this job
> by perl codes?
>
If the remote are supposed to run services, you could use the
appropriate Net::* modules to connect to them and see if the services
are available.
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
|
|
0
|
|
|
|
Reply
|
Mart
|
12/5/2009 7:21:14 PM
|
|
On Sat, 05 Dec 2009 20:21:14 +0100, Mart van de Wege
<mvdwege@mail.com> wrote:
>If the remote are supposed to run services, you could use the
>appropriate Net::* modules to connect to them and see if the services
>are available.
Yes, in my case, I mean the remote host act as a http proxy at
specified ports, such as 80, 3128 and so on.
For example, test hundreds of them, which are stored in a Plain text
file with the foramt of one ip:port per line, e.g.:
....
220.245.140.197:3128
200.19.159.34:3128
200.19.159.35:3128
200.132.0.70:3128
198.163.152.229:3128
198.163.152.230:3128
142.103.2.1:3128
142.103.2.2:3128
128.233.252.11:3128
128.233.252.12:3128
142.150.238.12:3128
142.150.238.13:3128
....
So I want to sove this issue quickly and accurately.
Any hints will be highly appreciated.
Best regards.
--
..: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
|
|
0
|
|
|
|
Reply
|
Hongyi
|
12/6/2009 11:04:51 AM
|
|
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> On Sat, 05 Dec 2009 20:21:14 +0100, Mart van de Wege
> <mvdwege@mail.com> wrote:
>
>>If the remote are supposed to run services, you could use the
>>appropriate Net::* modules to connect to them and see if the services
>>are available.
>
> Yes, in my case, I mean the remote host act as a http proxy at
> specified ports, such as 80, 3128 and so on.
>
> For example, test hundreds of them, which are stored in a Plain text
> file with the foramt of one ip:port per line, e.g.:
>
> ...
> 220.245.140.197:3128
> 200.19.159.34:3128
> 200.19.159.35:3128
<snip>
> So I want to sove this issue quickly and accurately.
> Any hints will be highly appreciated.
>
Erm.
Short of writing your program for you, I cannot give you any more
hints. This is as straightforward as it can get in Perl.
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
|
|
0
|
|
|
|
Reply
|
Mart
|
12/6/2009 6:47:33 PM
|
|
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> Yes, in my case, I mean the remote host act as a http proxy at
> specified ports, such as 80, 3128 and so on.
>
> For example, test hundreds of them, which are stored in a Plain text
> file with the foramt of one ip:port per line, e.g.:
>
> ...
> 220.245.140.197:3128
[...]
> So I want to sove this issue quickly and accurately.
> Any hints will be highly appreciated.
nmap? I mean, that's what they used in the Matrix :-)
Many systems and network administrators also find it useful for tasks
such as network inventory, managing service upgrade schedules, and
monitoring host or service uptime.
http://nmap.org/
--
John Bokma
Read my blog: http://johnbokma.com/
Hire me (Perl/Python): http://castleamber.com/
|
|
0
|
|
|
|
Reply
|
John
|
12/7/2009 12:22:29 AM
|
|
On 2009-12-04, smallpond <smallpond@juno.com> wrote:
> On Dec 4, 8:28�am, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
>> Hi all,
>>
>> I want to judge some remote hosts online or not quickly over WAN. I've
>> learned that ping command will not work in this case if the icmp ack
>> is blocked locally by firewall. �Is it possiable for me to do this job
>> by perl codes?
>
>
> So the problem is that they are online but you aren't.
> There is no valid reason to block ICMP packets.
Really? Lots of people do... I believe the idea is to prevent ping floods.
Kevin
|
|
0
|
|
|
|
Reply
|
Kevin
|
12/11/2009 7:45:08 PM
|
|
On 2009-12-11 19:45, Kevin Collins <spamtotrash@toomuchfiction.com> wrote:
> On 2009-12-04, smallpond <smallpond@juno.com> wrote:
>> On Dec 4, 8:28�am, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
>>> I want to judge some remote hosts online or not quickly over WAN. I've
>>> learned that ping command will not work in this case if the icmp ack
>>> is blocked locally by firewall. �Is it possiable for me to do this job
>>> by perl codes?
>>
>>
>> So the problem is that they are online but you aren't.
>> There is no valid reason to block ICMP packets.
>
> Really? Lots of people do...
Lots of people don't understand what they are doing.
> I believe the idea is to prevent ping floods.
To prevent ping floods you need to block ICMP echo requests to broadcast
addresses (or just don't reply to them) - blocking echo requests to
unicast adresses gains you (or the victim) nothing.
Anyway the idea is more that some people think that they can't be
attacked if they hide.
hp
|
|
0
|
|
|
|
Reply
|
Peter
|
12/12/2009 10:21:13 PM
|
|
On 2009-12-12, Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
> On 2009-12-11 19:45, Kevin Collins <spamtotrash@toomuchfiction.com> wrote:
>> On 2009-12-04, smallpond <smallpond@juno.com> wrote:
>>> On Dec 4, 8:28�am, Hongyi Zhao <hongyi.z...@gmail.com> wrote:
>>>> I want to judge some remote hosts online or not quickly over WAN. I've
>>>> learned that ping command will not work in this case if the icmp ack
>>>> is blocked locally by firewall. �Is it possiable for me to do this job
>>>> by perl codes?
>>>
>>>
>>> So the problem is that they are online but you aren't.
>>> There is no valid reason to block ICMP packets.
>>
>> Really? Lots of people do...
>
> Lots of people don't understand what they are doing.
>
>> I believe the idea is to prevent ping floods.
>
> To prevent ping floods you need to block ICMP echo requests to broadcast
> addresses (or just don't reply to them) - blocking echo requests to
> unicast adresses gains you (or the victim) nothing.
>
> Anyway the idea is more that some people think that they can't be
> attacked if they hide.
My point being that the OP has a valid point, regardless of whether it makes
sense or not :)
Kevin
|
|
0
|
|
|
|
Reply
|
Kevin
|
12/15/2009 9:57:32 PM
|
|
|
10 Replies
2226 Views
(page loaded in 0.114 seconds)
Similiar Articles: Perl / Sybase 2
28  usawargamer 7/24/2012 9:06:25 AM
|