- Run
sudo install.pyscript, it will createhawkpot.servicefor you. - Populate
config.jsonas you want. (There is aconfig.jsonsample file in this repo). - Run
hp_parser.py > compose.ymlto configure your honeynet. In addition tocompose.ymlit will createdefault.conffile (for the reverse proxy) inside./proxy/conf/directory andrules.shfile to setiptablesrules (for intrusions detecting). Rules will be set automatically. Furthermore reverse proxy use SSL, so you have to provide SSL certificates. You have to copy them inside./proxy/ssl/and you should name themnginx-selfsigned.crtandnginx-selfsigned.key. If you are an expert, you can editdefault.confto change names for your keys. Do it before run your composition. You may have to createsslfolder inside./proxy/, put here your keys. - Run
systemctl start hawkpot.service. It will startlog_manager.pyandintrusion_detector.py, they will write logs, respectively, insidelog_manager.logandintrusions.log(follow this file withtailto gain information about intrusions). - Start your composition:
docker compose start.
If you change your compose (manually or by hp_parser.py) you need to restart hawkpot.service.
Some commands will require elevated privileges so it might be useful add some lines to sudoers file if you don't want to use root user:
- run
sudo visudo - add at the end of the file the follow lines:
<your_user> ALL=(ALL) NOPASSWD: /usr/sbin/iptables
<your_user> ALL=(ALL) NOPASSWD: /usr/sbin/iptables-restore
<your_user> ALL=(ALL) NOPASSWD: /bin/systemctl restat docker