Filippo Carletti wrote:
> I gave it a test. Works on sme5 if you have only one local
> network.
So, if I understand it well, Transproxy still do not support multiple local networks... I noticed this problem, told the author about it and sent him a fix.
To whom it may concern, on my 4.0.1 I did what follows:
1. copied 20-src-local from /etc/e-smith/templates/usr/local/squidGuard/squidGuard.conf to /etc/e-smith/templates-custom/usr/local/squidGuard/squidGuard.conf
2. edited it to show as follows:
---------- 8< ----------
{
#--------------------------------------------------
# Compute local IP address and netmask values.
#--------------------------------------------------
my $ipaddrBits = esmith::util::IPquadToAddr ($LocalIP);
my $netmaskBits = esmith::util::IPquadToAddr ($LocalNetmask);
$network = esmith::util::IPaddrToQuad ($ipaddrBits & $netmaskBits);
$broadcast = esmith::util::IPaddrToQuad ($ipaddrBits | (~ $netmaskBits));
"";
}
# local computers
src local \{
ip { "$network/$LocalNetmask"; }
{
#--------------------------------------------------
# Compute local networks IP addresses and netmasks
#--------------------------------------------------
my %networks;
tie %networks, 'esmith::config', '/home/e-smith/networks';
my $key;
my $value;
my @networkList = ();
while (($key,$value) = each %networks)
{
my ($type, %properties) = split (/\|/, $value, -1);
if ($type eq 'network')
{
push (@networkList, $key);
}
}
my $numNetworks = @networkList;
if ($numNetworks > 0)
{
my $network;
foreach $network (sort @networkList)
{
my $value = $networks {$network};
my ($type, %properties) = split (/\|/, $value, -1);
$OUT .= " ip\t\t$network/$properties{'Mask'}\n"
}
}
"";
}
\}
---------- 8< ----------
3. added the necessary links for network change processing; as root:
# cd /etc/e-smith/events/network-create
# ln -s ../actions/conf-squidGuard S55conf-squidGuard
# cd /etc/e-smith/events/network-delete
# ln -s ../actions/conf-squidGuard S55conf-squidGuard
Now, everytime the local network list gets changed the squidGuard config file is recreated, including local networks in the authorized ones.
HTH...
--
Pierluigi Miranda