diff --git a/inst/testing/nemo1/install_and_run_vsmd b/inst/testing/nemo1/install_and_run_vsmd new file mode 100755 index 0000000000000000000000000000000000000000..11b5a43b9a069962cd5273ea4f18b06e2dc0ecfc --- /dev/null +++ b/inst/testing/nemo1/install_and_run_vsmd @@ -0,0 +1,54 @@ +#!/bin/bash + +if [ ! -f /.nemo_vsmd_setuped ]; then + + set -e + + apt-get -yyy install xtables-addons-dkms xtables-addons-common exabgp linux-headers-amd64 + perl -MCPAN -e 'install (Net::CIDR::Lite)' + perl -MCPAN -e 'install (Text::CSV_XS)' + mkdir -p /usr/share/xt_geoip + + ( + cd /usr/share/xt_geoip + /usr/libexec/xtables-addons/xt_geoip_dl + /usr/libexec/xtables-addons/xt_geoip_build -D /usr/share/xt_geoip + ) + + apt-get -yyy install virtualenv + + touch /.nemo_vsmd_setuped + +fi + +# + +cd nemo-vsmd/ + +if [ ! -d venv ]; then + virtualenv venv +fi + +. venv/bin/activate + +pip install -r requirements.txt + +export PYTHONPATH="$PYTHONPATH:$PWD/lib/python3/" + +mkdir -p /services/etc/nemo/ + +if [ ! -f /services/etc/nemo/nemo.conf -o ../nemo.conf.vsmd -nt /services/etc/nemo/nemo.conf ]; then + #touch /services/etc/nemo/nemo.conf + #echo "[vsmd]" >> /services/etc/nemo/nemo.conf + # + #cp -vf ./doc/nemo.conf.example /services/etc/nemo/nemo.conf + # + cp -vf ../nemo.conf.vsmd /services/etc/nemo/nemo.conf +fi + +echo TODO: configure /services/etc/nemo/nemo.conf +echo use ./bin/adm.py OR ./bin/nemo-vsmd + +exec ./bin/nemo-vsmd "$@" + + diff --git a/inst/testing/nemo1/nemo.conf.vsmd b/inst/testing/nemo1/nemo.conf.vsmd new file mode 100644 index 0000000000000000000000000000000000000000..95ff3deab344570ae9e258f88d05100af79e0a3c --- /dev/null +++ b/inst/testing/nemo1/nemo.conf.vsmd @@ -0,0 +1,29 @@ +[vsmd] +countermeasurectl: /opt/countermeasure/countermeasure.py +offrampctl: /bin/echo +flowspec_redirect: 65023:172 + +#rpc_host: localhost +rpc_host: 172.18.0.1 +rpc_port: 3236 + +sqlite_db: /services/data/vsmd/vsmd.sqlite + +#ssl_key: /services/etc/nemo/ssl/testvm.test.org.key +#ssl_cert: /services/etc/nemo/ssl/testvm.test.org.pem +#ssl_ca: /services/etc/nemo/ssl/test-ca-chain.pem +ssl_key: /nemo-all/secrets/nemo-analyse.key +ssl_cert: /nemo-all/secrets/nemo-analyse.pem +ssl_ca: /nemo-all/secrets/nemo-analyse-cachain.pem + +stats_interval: 60 + +[nemo_identities] + +# TODO: replace by actual fingerprint? of cert: +F13A90C5F2637C6AECF744126D6BE46A27BDACCE: Nemo Testinstanz + +[Nemo Testinstanz] +cidr_ro: 10.0.1.0/24 +cidr_rw: 127.0.0.0/8 +