Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Ping and Linux firewall

by trippledubs (Deacon)
on Sep 02, 2015 at 16:24 UTC ( [id://1140813]=note: print w/replies, xml ) Need Help??


in reply to Ping and Linux firewall

By default Net::Ping does a tcp ping. Normal OS pings are usually ICMP. You could try allowing inbound port number 7 to make the TCP Net::Ping work or
$p = Net::Ping->new("icmp");
to make your Net::Ping use ICMP protocol.

Replies are listed 'Best First'.
Re^2: Ping and Linux firewall
by chrestomanci (Priest) on Sep 07, 2015 at 10:36 UTC

    Agreed, You will probably have more luck with an ICMP ping.

    One caveat, is that on Linux at least, your perl process will need root to send ICMP packets. (you will find that the ping binary is setuid root on Linux). This might not be an issue on windows as the security tends to be more lax, and you are probably logged in with admin privileges, but it is something to keep in mind.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1140813]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found