Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 2640 2018-09-20 21:21:15Z rexy $
|
2 |
# $Id: alcasar.sh 2643 2018-10-21 10:26:40Z rexy $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
|
5 |
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
7 |
# team@alcasar.net
|
7 |
# team@alcasar.net
|
Line 1449... |
Line 1449... |
1449 |
# Add the listen port to collect netflow packet (nfcapd)
|
1449 |
# Add the listen port to collect netflow packet (nfcapd)
|
1450 |
$SED "s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1;'?g" /usr/libexec/NfSenRC.pm
|
1450 |
$SED "s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1;'?g" /usr/libexec/NfSenRC.pm
|
1451 |
# expire delay for the profile "live"
|
1451 |
# expire delay for the profile "live"
|
1452 |
/usr/bin/systemctl start nfsen
|
1452 |
/usr/bin/systemctl start nfsen
|
1453 |
/bin/nfsen -m live -e 62d 2>/dev/null
|
1453 |
/bin/nfsen -m live -e 62d 2>/dev/null
|
1454 |
# add SURFmap plugin
|
1454 |
# add SURFmap plugin (waiting for new technical solution)
|
- |
|
1455 |
# see https://adullact.net/forum/forum.php?thread_id=319545&forum_id=1601&group_id=450
|
1455 |
cp $DIR_CONF/nfsen/SURFmap_*.tar.gz /tmp/
|
1456 |
# cp $DIR_CONF/nfsen/SURFmap_*.tar.gz /tmp/
|
1456 |
cp $DIR_CONF/nfsen/GeoLiteCity* /tmp/
|
1457 |
# cp $DIR_CONF/nfsen/GeoLiteCity* /tmp/
|
1457 |
tar xzf /tmp/SURFmap_*.tar.gz -C /tmp/
|
1458 |
# tar xzf /tmp/SURFmap_*.tar.gz -C /tmp/
|
1458 |
cd /tmp/
|
1459 |
# cd /tmp/
|
1459 |
/usr/bin/sh SURFmap/install.sh
|
1460 |
# /usr/bin/sh SURFmap/install.sh
|
1460 |
chown -R apache:apache /var/www/html/acc/manager/nfsen /usr/share/nfsen /var/log/nfsen
|
- |
|
1461 |
# clear the installation
|
1461 |
# clear the installation
|
1462 |
cd $DirTmp
|
1462 |
# cd $DirTmp
|
1463 |
rm -rf /tmp/nfsen-*
|
1463 |
# rm -rf /tmp/nfsen-*
|
1464 |
rm -rf /tmp/SURFmap*
|
1464 |
# rm -rf /tmp/SURFmap*
|
- |
|
1465 |
chown -R apache:apache /var/www/html/acc/manager/nfsen /usr/share/nfsen /var/log/nfsen
|
1465 |
} # End of nfsen ()
|
1466 |
} # End of nfsen ()
|
1466 |
|
1467 |
|
1467 |
###########################################################
|
1468 |
###########################################################
|
1468 |
## Function "vnstat" ##
|
1469 |
## Function "vnstat" ##
|
1469 |
## - Initialization of Vnstat and vnstat phpFrontEnd ##
|
1470 |
## - Initialization of Vnstat and vnstat phpFrontEnd ##
|