First workig install script. Added systemd service. Fixed bug in client
This commit is contained in:
parent
ea4573371d
commit
18a798fc59
4 changed files with 85 additions and 20 deletions
29
systemd/ipban.service
Normal file
29
systemd/ipban.service
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
[Unit]
|
||||
Description=Service for banning ip adresses
|
||||
After=nftables.target
|
||||
#Before=
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/python /opt/ipban/daemon.py
|
||||
|
||||
User=ipban
|
||||
Group=ipban
|
||||
|
||||
StateDirectory=ipban
|
||||
StateDirectoryMode=775
|
||||
|
||||
RuntimeDirectory=ipban
|
||||
RuntimeDirectoryMode=775
|
||||
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
|
||||
AmbientCapabilities=CAP_NET_ADMIN
|
||||
CapabilityBoundingSet=CAP_NET_ADMIN
|
||||
NoNewPrivileges=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue