]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.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 22:02:44 +0000 (23:02 +0100)
commitbc66b2f45ade2c63cfd14d5388f6ca0905a23bb0
tree08979f0564ca5a80d27ea354c288a7d5c26b0845
parent1edc497a80fb967c5ccf5293b4f746645260b780
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

(From OE-Core rev: 76d3574d17c38d93ba4660bdae5730ac222994d4)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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