add install script | add minimal readme
This commit is contained in:
parent
3160c6effe
commit
49995e6151
|
@ -0,0 +1,20 @@
|
||||||
|
## Firewall integration in systemd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Simple tool to load your **iptables** rules at boot time. It integrates with systemd as a multi instance service.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 1/ Install the tool
|
||||||
|
|
||||||
|
Launch the `./install.sh` script as root.
|
||||||
|
|
||||||
|
##### 2/ Define your rules
|
||||||
|
|
||||||
|
Place a bash script defining your **iptables** rules into `/opt/firewall/<config_name>.fw` where `<config_name>` is an arbitrary name that makes sense to you.
|
||||||
|
|
||||||
|
##### 3/ Enable at boot
|
||||||
|
|
||||||
|
To enable your rules to load at boot time, simply run `systemctl enable firewall@<config_name>.service`. If you want to execute your script explicitly run `systemctl start firewall@<config_name>.service`.
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
root=$(realpath $(dirname $0));
|
||||||
|
|
||||||
|
# 1/ copy the service file
|
||||||
|
mkdir -p /usr/lib/systemd/system/;
|
||||||
|
cp -r ./usr/lib/systemd/system/firewall@.service /usr/lib/systemd/system/;
|
Loading…
Reference in New Issue