|
|
4 years ago | |
|---|---|---|
| go | 4 years ago | |
| LICENSE | 4 years ago | |
| README.md | 4 years ago | |
| iptables-api | 4 years ago | |
Very simple API for managing local iptables chain: APIBANLOCAL
Simple GET actions of add, remove, and flush.
./iptables-api
Defaults:
8082/var/log/iptables-api.logREJECT./iptables-api -log=stdout -port=8008 -target=DROP
If executable is in /usr/local/iptables-api/...
cat > /lib/systemd/system/iptables-api.service << EOT
[Unit]
Description=iptables-api
[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/usr/local/iptables-api/iptables-api
[Install]
WantedBy=multi-user.target
EOT
Log rotate...
cat > /etc/logrotate.d/iptables-api << EOF
/var/log/iptables-api.log {
daily
copytruncate
rotate 12
compress
}
EOF
iptables-api is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version
iptables-api is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.