]> code.ossystems Code Review - openembedded-core.git/commit
iptables: add systemd helper unit to load/restore rules
authorJack Mitchell <jack@embed.me.uk>
Thu, 5 Sep 2019 09:35:37 +0000 (09:35 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Sep 2019 08:54:21 +0000 (09:54 +0100)
commit76d3574d17c38d93ba4660bdae5730ac222994d4
treea45bcb9b8d25156703d960a545cb6487bbafe720
parent7e0c9290a9971b92bcb313742f126ca7488d91c3
iptables: add systemd helper unit to load/restore rules

There is currently no way to automatically load iptables rules in OE.
Add a systemd unit file to automatically load rules on network
connection. This is cribbed from the way ArchLinux handles iptables with
some minor modifications for OE.
New rules can be generated directly on the target using:
# iptables-save -f /etc/iptables/iptables.rules
Good documentation for writing rules offline is lacking, but the basics
are explained here:
https://unix.stackexchange.com/q/400163/49405

Signed-off-by: Jack Mitchell <jack@embed.me.uk>
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/iptables/iptables/iptables.rules [new file with mode: 0644]
meta/recipes-extended/iptables/iptables/iptables.service [new file with mode: 0644]
meta/recipes-extended/iptables/iptables_1.8.3.bb