Date: Monday, August 20, 2018 @ 07:34:08 Author: bpiotrowski Revision: 332681
1.8.0-1 Added: iptables/trunk/arptables iptables/trunk/arptables.service iptables/trunk/ebtables iptables/trunk/ebtables.service Modified: iptables/trunk/PKGBUILD -------------------+ PKGBUILD | 44 +++++++++++++++++++++++--------------------- arptables | 21 +++++++++++++++++++++ arptables.service | 13 +++++++++++++ ebtables | 21 +++++++++++++++++++++ ebtables.service | 13 +++++++++++++ 5 files changed, 91 insertions(+), 21 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-08-20 07:17:11 UTC (rev 332680) +++ PKGBUILD 2018-08-20 07:34:08 UTC (rev 332681) @@ -11,17 +11,15 @@ url='http://www.netfilter.org/projects/iptables/index.html' depends=(glibc bash libnftnl libpcap) makedepends=(linux-api-headers) +provides=(ebtables arptables) +conflicts=(ebtables arptables) +replaces=(ebtables arptables) source=(http://www.netfilter.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2{,.sig} empty.rules simple_firewall.rules - empty-filter.rules - empty-mangle.rules - empty-nat.rules - empty-raw.rules - empty-security.rules - iptables.service - ip6tables.service - iptables-flush) + empty-{filter,mangle,nat,raw,security}.rules + {iptables,ip6tables,ebtables,arptables}.service + iptables-flush arptables ebtables) sha1sums=('04924fd00dbaf8189f0777af90f7bdb73ac7e47c' 'SKIP' '83b3363878e3660ce23b2ad325b53cbd6c796ecf' @@ -33,7 +31,11 @@ 'ebbd1424a1564fd45f455a81c61ce348f0a14c2e' '49be9443fc302dd0fda78b63d64e884cadb61603' '9cec592787e32451f58fa608ea057870e07aa704' - 'e7abda09c61142121b6695928d3b71ccd8fdf73a') + '052fe6a802d5c7be015881787ed716819db1ca0a' + 'f15bd7937a10fbfcc6443f55a25cd566a460ebe7' + 'e7abda09c61142121b6695928d3b71ccd8fdf73a' + '1502ebe011f44e5553d9cbd5023755cd9f3e8c75' + '436f8adb727e93e92a07834ba0e93f4364587901') validpgpkeys=('C09DB2063F1D7034BA6152ADAB4655A126D292E4') # Netfilter Core Team prepare() { @@ -63,19 +65,19 @@ make DESTDIR="$pkgdir" install cd "$srcdir" - install -Dm644 empty.rules "${pkgdir}"/etc/iptables/empty.rules - install -Dm644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules + install -Dm644 empty.rules "$pkgdir/etc/iptables/empty.rules" + install -Dm644 simple_firewall.rules "$pkgdir/etc/iptables/simple_firewall.rules" install -d "$pkgdir"/var/lib/{iptables,ip6tables} - install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables - install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/ip6tables + install -m644 empty-{filter,mangle,nat,raw,security}.rules "$pkgdir/var/lib/iptables" + install -m644 empty-{filter,mangle,nat,raw,security}.rules "$pkgdir/var/lib/ip6tables" - # install systemd files - install -Dm644 iptables.service \ - "$pkgdir/usr/lib/systemd/system/iptables.service" - install -Dm644 ip6tables.service \ - "$pkgdir/usr/lib/systemd/system/ip6tables.service" - install -Dm755 iptables-flush \ - "$pkgdir/usr/lib/systemd/scripts/iptables-flush" + for unit in iptables ip6tables arptables ebtables; do + install -Dm644 ${unit}.service "$pkgdir/usr/lib/systemd/system/${unit}.service" + done + + for helper in iptables-flush arptables ebtables; do + install -Dm755 $helper \ + "$pkgdir/usr/lib/systemd/scripts/$helper" + done } - Added: arptables =================================================================== --- arptables (rev 0) +++ arptables 2018-08-20 07:34:08 UTC (rev 332681) @@ -0,0 +1,21 @@ +#!/bin/bash + +CONFIG_FILE='/etc/arptables.conf' + +case $1 in + start) + arptables-restore < "$CONFIG_FILE" + ;; + stop) + arptables-restore < /dev/null + ;; + save) + arptables-save > "$CONFIG_FILE" + ;; + *) + echo "usage: ${0##*/} {start|stop|save}" >&2 + exit 1 + ;; +esac + +# vim:set ts=2 sw=2 ft=sh et: Added: arptables.service =================================================================== --- arptables.service (rev 0) +++ arptables.service 2018-08-20 07:34:08 UTC (rev 332681) @@ -0,0 +1,13 @@ +[Unit] +Description=ARP Tables +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/lib/systemd/scripts/arptables start +ExecStop=/usr/lib/systemd/scripts/arptables stop + +[Install] +WantedBy=multi-user.target Added: ebtables =================================================================== --- ebtables (rev 0) +++ ebtables 2018-08-20 07:34:08 UTC (rev 332681) @@ -0,0 +1,21 @@ +#!/bin/bash + +CONFIG_FILE='/etc/ebtables.conf' + +case $1 in + start) + ebtables-restore < "$CONFIG_FILE" + ;; + stop) + ebtables -F + ;; + save) + ebtables-save > "$CONFIG_FILE" + ;; + *) + echo "usage: ${0##*/} {start|stop|save}" >&2 + exit 1 + ;; +esac + +# vim:set ts=2 sw=2 ft=sh et: Added: ebtables.service =================================================================== --- ebtables.service (rev 0) +++ ebtables.service 2018-08-20 07:34:08 UTC (rev 332681) @@ -0,0 +1,13 @@ +[Unit] +Description=Ethernet bridge table +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/lib/systemd/scripts/ebtables start +ExecStop=/usr/lib/systemd/scripts/ebtables stop + +[Install] +WantedBy=multi-user.target
