Ok. It does not work. Here is what the code looks like. Can you please still help, this is driving me nuts.
[root@Rage root]# pico /etc/e-smith/templates-custom/etc/rc.d/init.d/masq/40AllowICMPIn
UW PICO(tm) 4.2 File: /etc/e-smith/templates-custom/etc/rc.d/init.d/masq/40AllowICMPIn
{
use esmith::NetworksDB;
# We want to be very selective on the ICMPs we accept to stop
# route hijacking
my @OKicmpTypes = (
qw(
destination-unreachable
source-quench
time-exceeded
parameter-problem
) );
my %services = ( masq => $masq );
my $stealth = db_get_prop(\%services, 'masq', 'Stealth') || 'no';
unless ($stealth eq 'yes')
{
}
foreach my $icmpType (@OKicmpTypes)
{
$OUT .= < /sbin/ipchains --append icmpIn --proto icmp --icmp-type $icmpType --jump ACCEPT
HERE
}
# Even in 'stealth' mode, we should allow ICMP ECHO on the LAN port
my ($network, $broadcast) = esmith::util::computeNetworkAndBroadcast ($LocalIP, $LocalNetmask);
my %networks;
$networks{$network} = $LocalNetmask;
my $ndb = esmith::NetworksDB->open();
foreach my $net ($ndb->get_all())
{
($network,$broadcast) = esmith::util::computeNetworkAndBroadcast(
$net->key, $net->prop('Mask'));
$networks{$network} = $net->prop('Mask');
}
foreach $net (keys %networks)
{
$OUT .= < /sbin/ipchains --append icmpIn --proto icmp --source $net/$networks{$net} -j ACCEPT
[ line 1 of 48 (2%), character 0 of 1200 (0%) ]