Quantcast
Channel: NethServer Community - Latest posts
Viewing all articles
Browse latest Browse all 111560

Nethserver-arpwatch: Needs Tests

$
0
0

some enhancements like that you will find all interfaces with a green role...IMHO the status propriety should be enabled by default

# -u <username> : defines with what user id arpwatch should run
# -e <email>    : the <email> where to send the reports
# -s <from>     : the <from>-address
{
 use esmith::NetworksDB;
 my $ndb = esmith::NetworksDB->open_ro();

my $bogonset='';
my $bogon = ${'arpwatch'}{'bogon'};

if ($bogon eq 'enabled') {
 $bogonset = '';
}
else {
 $bogonset = '-N';
}

my $mailset= ${'arpwatch'}{'email'};
foreach my $i ($ndb->green) {
    my $interfaces = $i->key;
    $OUT .= "OPTIONS=\"-i $interfaces  $bogonset -f /var/lib/arpwatch/arp.dat -u arpwatch -e $mailset -s 'arpwatch\@${'DomainName'}'\"\n";
}
}

Viewing all articles
Browse latest Browse all 111560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>