Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Ping and Linux firewall

by trippledubs (Deacon)
on Sep 02, 2015 at 16:24 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-10-06 02:00 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (26 votes). Check out past polls.