[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing :: View topic - UpDown Net::Ping::external problem
Cheshire Cat Computing
https://steveshipway.org/forum/

UpDown Net::Ping::external problem
https://steveshipway.org/forum/viewtopic.php?f=4&t=1068
Page 1 of 1

Author:  netguy2000 [ Fri Feb 23, 2007 3:09 am ]
Post subject:  UpDown Net::Ping::external problem

UpDown.cgi working fine in inside my network but its not able to ping outside of my network, there is some prblem in UpDown Net:Ping::External , Please help me how to fix this problem.

Net Ping External is install in my Linux PC and working fine, because the below mention script is working fine with Net Ping External in my PC.

#!/usr/bin/perl
use Net::Ping::External qw(ping);

# Or a list of hosts 10.16.10.0 is my inside network 62.216.xxx.0 is Outside network.
my @hosts = qw(10.16.10.1 10.16.10.2 10.16.10.5 62.216.xxx.xx 62.216.xxx.xx);
my $num_alive = 0;
foreach (@hosts) {
$alive = ping(hostname => $_, timeout => 5);
print "$_ is alive!\n" if $alive;
}


and the result is

[root@networkmoni ~]# ./netping.pl
10.16.10.1 is alive!
10.16.10.2 is alive!
10.16.10.5 is alive!
62.216.xxx.xx is alive!
62.216.xxx.xx is alive!
[root@networkmoni ~]#
:?: :?: :?: :?:

Author:  stevesh [ Fri Feb 23, 2007 12:54 pm ]
Post subject: 

updown.cgi uses Net::Ping, and not Net::Ping::External (although this might override some stuff if you modify the updown script to use it).

I believe that Net::Ping can send either tcp, udp or icmp ping packets depending on the option you pass -- only root privs can send icmp. Using Net::Ping::External probably forks off a separate process to call the (setuid) ping command.

I suspect that you have a firewall blocking external tcp-based pings but not icmp -- so updown cannot run with icmp (because you're not root) but cannot use tcp (because of the firewall). Using External might solve the problem although I've never used this package.

updown.cgi is ooooold. Probably needs a rewrite to support multiple targets, a 'warning' state, and use of this new External package...

Author:  netguy2000 [ Fri Feb 23, 2007 7:52 pm ]
Post subject: 

There is no firewall within or out of my network. I can ping these IPs easily and I have root priviliges on my PC.

Plzz help.


Rizwan.

Author:  stevesh [ Mon Feb 26, 2007 9:39 am ]
Post subject: 

Remember that a CGI script is run as the web server user, not as root (if you're running your web server as root then you have far larger problems)

To track this down I would need a lot more information about your network border gateway. For example, you might have NAT or some sort of firewall you don't know about. Since I have no knowledge of your network topology I can't make much of a guess as to why external addresses can't be pinged, but the usual reason for this sort of behaviour is some sort of firewall.

Note that if you're using the CGI then you're probably sending tcp pings rather than icmp pings which may be filtered at your border whereas an icmp ping would not be, explaining why Net::Ping::Extenral works and Net::Ping does not.

Page 1 of 1 All times are UTC + 12 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/