pavement

Talk:Firewall, Monitoring

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(formatting errors)
Line 52: Line 52:
  
 
gaZooGA
 
gaZooGA
 +
 +
== formatting errors ==
 +
 +
The wiki was automatically converting <nowiki>''</nowiki> to an attempt to italicize code, where I was using it in the script for the usual purpose - to represent a null string.  I added &lt;nowiki> tags to nerf the problem - grab a copy again and replace yours with it, and all should be well.
 +
 +
Hope you like the setup!

Revision as of 00:02, 17 March 2005

Hi i was wondering how i make the file work.

i have managed to get it to run but am getting these errors with it:


[Wed Mar 16 22:30:17 2005] [error] [client 192.168.0.2] syntax error at /usr/local/www/cgi-bin/firewall.pl line 186, near "eq

[Wed Mar 16 22:30:17 2005] [error] [client 192.168.0.2] syntax error at /usr/local/www/cgi-bin/firewall.pl line 193, near "eq

[Wed Mar 16 22:30:17 2005] [error] [client 192.168.0.2] syntax error at /usr/local/www/cgi-bin/firewall.pl line 200, near "}"

[Wed Mar 16 22:30:17 2005] [error] [client 192.168.0.2] Execution of /usr/local/www/cgi-bin/firewall.pl aborted due to compil

[Wed Mar 16 22:30:17 2005] [error] [client 192.168.0.2] Premature end of script headers: firewall.pl


just wondering if you have an updated version of this file

thanks


gaZooGA

you're getting these errors how?


you know that that's a cgi script, not intended to be run from a command line, right? are you getting those errors from a browser when you try to browse into it, or...? --Jimbo 11:21, 16 Mar 2005 (EST)


Hi Sorry i should have given more information.

I am getting the errors from the browser. The error logs are from apache2 httpd. If I put a numerical value like 1 after the eq's:

               unless ($log[$loop][6] eq 1 ) { <-----This line
                       print "<tr>\n";
                       for ($element=0; $element<12; $element++) {
                               unless ($element eq 2) {print $bodycellbegin . $log[$loop][$element] . $bodycellend;}
                               if ($host_lookups * ($element eq 6)) {
                                       my $hostname = `$dig_cmd $log[$loop][6] $dig_opts`;
                                       if (($hostname =~ m/\<\<\>\>/) + ($hostname eq 1 )) {$hostname = ' ';} <-----And this line

the script compliles and runs but only prints the tops of the tables.

here is the link http://rarm.gazooga.net/cgi-bin/firewall.pl

so i am just wondering what to put afte the two eq statements.

unless ($log[$loop][6] eq ) & if (($hostname =~ m/\<\<\>\>/) + ($hostname eq 1 )) {$hostname = ' ';}

Thanks for getting back to me.

gaZooGA

formatting errors

The wiki was automatically converting '' to an attempt to italicize code, where I was using it in the script for the usual purpose - to represent a null string. I added <nowiki> tags to nerf the problem - grab a copy again and replace yours with it, and all should be well.

Hope you like the setup!

Personal tools