- Korean: 이 페이지는 아직 한글로 번역되지 않았습니다.
net-darkstat.plugin.bash¤
darkstat install configurations. it can be extended to log houly ips and show statistics.
group:postnet | runtype:minmon | deps: - | port: LO:19283
Usage
net-darkstat install|uninstall|download|disable|configgen|configapply|check|run
$ net-darkstat install - install darkstat
$ net-darkstat uninstall - uninstall darkstat
$ net-darkstat download - download darkstat package files to pkg dir
$ net-darkstat disable - disable darkstat plugin
$ net-darkstat configgen - generate darkstat configuration files
$ net-darkstat configapply - apply darkstat configuration files
$ net-darkstat check - check darkstat plugin status
$ net-darkstat run - run darkstat service
$ net-darkstat help - show this help message
Description
Darkstat is saving network traffic statistics and serving them over HTTP.
Other Application Used¤
html-csv-converter : download ip list from darkstat web interface and save to log.
cdn-lookup : show companies by ip address.
Jangbi Configs¤
/opt/jangbi/.config
RUN_NET_DARKSTAT=1 # enable darkstat
DARKSTAT_PORTS="LO:19283,LAN:19283" # ports to listen, LO - localhost, LAN - LAN interface , 19283 - port
Check if running¤
bash command
$ ss -nltup|grep darkstat
tcp LISTEN 0 128 127.0.0.1:19283 0.0.0.0:* users:(("darkstat",pid=24887,fd=3))
$ pidof darkstat
24887
Current Configuration¤
Current configuration is stored in /etc/darkstat/
. it is generated by net-darkstat configgen
command on install.
You can edit it manually and not run install or configapply commands to keep current configurations.
/etc/darkstat/init.conf
START_DARKSTAT=yes
DS_STATIC_VARS="--chroot /var/log/darkstat --user darkstat --pidfile darkstat.pid --no-dns --daylog darkstat_day.log --no-promisc --export darkstat.db --import darkstat.db --no-daemon --no-macs"
INTERFACE="-i enx00e04c680686"
LOCAL="-l 192.168.79.186/255.255.255.0"
PORT="-p 19283"
BINDIP="-b 127.0.0.1"
# darkstat $STATIC_VARS $INTERFACE $PORT $BINDIP $LOCAL
# darkstat --chroot /var/log/darkstat --user darkstat --pidfile darkstat.pid --no-dns --daylog darkstat_day.log --no-promisc --export darkstat.db --import darkstat.db --no-daemon --no-macs -i enx00e04c680686 -p 19283 -b 127.0.0.1 -l 192.68.79.0/255.255.255.0