diff options
Diffstat (limited to 'core/iptables')
-rw-r--r-- | core/iptables/APKBUILD | 66 | ||||
-rw-r--r-- | core/iptables/iptables-1.4.2-include-in.patch | 12 | ||||
-rw-r--r-- | core/iptables/iptables.confd | 11 | ||||
-rwxr-xr-x | core/iptables/iptables.initd | 114 |
4 files changed, 0 insertions, 203 deletions
diff --git a/core/iptables/APKBUILD b/core/iptables/APKBUILD deleted file mode 100644 index 2a503aca77..0000000000 --- a/core/iptables/APKBUILD +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> - -pkgname=iptables -pkgver=1.4.4 -pkgrel=0 -pkgdesc="Linux kernel firewall, NAT and packet mangling tools" -url="http://www.iptables.org/" -license=GPL-2 -source="http://iptables.org/projects/iptables/files/$pkgname-$pkgver.tar.bz2 - iptables-1.4.2-include-in.patch - iptables.initd - iptables.confd - " - -makedepends="linux-headers" -subpackages="ip6tables $pkgname-doc $pkgname-dev" - -build() { - local i - cd "$srcdir/$pkgname-$pkgver" - for i in ../*.patch; do - msg "Applying $i..." - patch -p1 -i $i || return 1 - done - - ./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --sbindir=/sbin \ - --without-kernel \ - --enable-devel \ - --enable-libipq \ - --enable-shared - make || return 1 - make install DESTDIR="$pkgdir" - - mkdir -p "$pkgdir"/usr/include/libiptc \ - "$pkgdir"/usr/lib \ - "$pkgdir"/var/lib/iptables \ - "$pkgdir"/etc/init.d \ - "$pkgdir"/etc/conf.d - install -m644 include/iptables.h include/ip6tables.h \ - "$pkgdir"/usr/include/ - install include/libiptc/*.h "$pkgdir"/usr/include/libiptc/ - install -m644 libiptc/libiptc.a "$pkgdir"/usr/lib - install -m755 "$startdir"/iptables.initd "$pkgdir"/etc/init.d/iptables - install -m644 "$startdir"/iptables.confd "$pkgdir"/etc/conf.d/iptables -} - -ip6tables() { - mkdir -p "$subpkgdir"/sbin \ - "$subpkgdir"/etc/init.d/ \ - "$subpkgdir"/var/lib/ip6tables \ - "$subpkgdir"/usr/libexec/xtables - - mv "$pkgdir"/sbin/ip6* "$subpkgdir"/sbin/ - mv "$pkgdir"/usr/libexec/xtables/libip6* \ - "$subpkgdir"/usr/libexec/xtables/ - install -m755 "$startdir"/iptables.initd \ - "$subpkgdir"/etc/init.d/ip6tables -} - -md5sums="08cd9196881657ea0615d926334cb7e9 iptables-1.4.4.tar.bz2 -ec3e80a1b0ea3e13e4e60824b7ebd1b9 iptables-1.4.2-include-in.patch -2202ac150a5dfe32a8363b0ad565ee1d iptables.initd -956ebf5ab69e5a1e1d3983541eab643b iptables.confd" diff --git a/core/iptables/iptables-1.4.2-include-in.patch b/core/iptables/iptables-1.4.2-include-in.patch deleted file mode 100644 index 138fa564ca..0000000000 --- a/core/iptables/iptables-1.4.2-include-in.patch +++ /dev/null @@ -1,12 +0,0 @@ -pull in in.h as it sets up some proto defines that iptables relies on - ---- a/include/xtables.h.in -+++ b/include/xtables.h.in -@@ -5,6 +5,7 @@ - #include <sys/types.h> - #include <stdbool.h> - #include <net/if.h> -+#include <netinet/in.h> - #include <linux/types.h> - #include <linux/netfilter/x_tables.h> - diff --git a/core/iptables/iptables.confd b/core/iptables/iptables.confd deleted file mode 100644 index 91287debdb..0000000000 --- a/core/iptables/iptables.confd +++ /dev/null @@ -1,11 +0,0 @@ -# /etc/conf.d/iptables - -# Location in which iptables initscript will save set rules on -# service shutdown -IPTABLES_SAVE="/var/lib/iptables/rules-save" - -# Options to pass to iptables-save and iptables-restore -SAVE_RESTORE_OPTIONS="-c" - -# Save state on stopping iptables -SAVE_ON_STOP="yes" diff --git a/core/iptables/iptables.initd b/core/iptables/iptables.initd deleted file mode 100755 index e63d8ea9e2..0000000000 --- a/core/iptables/iptables.initd +++ /dev/null @@ -1,114 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables-1.3.2.init,v 1.6 2007/03/12 21:49:04 vapier Exp $ - -opts="save reload panic" - -iptables_name=${SVCNAME} -if [ "${iptables_name}" != "iptables" -a "${iptables_name}" != "ip6tables" ] ; then - iptables_name="iptables" -fi - -iptables_bin="/sbin/${iptables_name}" -case ${iptables_name} in - iptables) iptables_proc="/proc/net/ip_tables_names" - iptables_save=${IPTABLES_SAVE};; - ip6tables) iptables_proc="/proc/net/ip6_tables_names" - iptables_save=${IP6TABLES_SAVE};; -esac - -depend() { - before net - use logger -} - -set_table_policy() { - local chains table=$1 policy=$2 - case ${table} in - nat) chains="PREROUTING POSTROUTING OUTPUT";; - mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";; - filter) chains="INPUT FORWARD OUTPUT";; - *) chains="";; - esac - local chain - for chain in ${chains} ; do - ${iptables_bin} -t ${table} -P ${chain} ${policy} - done -} - -checkkernel() { - if [ ! -e ${iptables_proc} ] ; then - eerror "Your kernel lacks ${iptables_name} support, please load" - eerror "appropriate modules and try again." - return 1 - fi - return 0 -} -checkconfig() { - if [ ! -f ${iptables_save} ] ; then - eerror "Not starting ${iptables_name}. First create some rules then run:" - eerror "/etc/init.d/${iptables_name} save" - return 1 - fi - return 0 -} - -start() { - checkconfig || return 1 - ebegin "Loading ${iptables_name} state and starting firewall" - ${iptables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" - eend $? -} - -stop() { - if [ "${SAVE_ON_STOP}" = "yes" ] ; then - save || return 1 - fi - checkkernel || return 1 - ebegin "Stopping firewall" - local a - for a in $(cat ${iptables_proc}) ; do - set_table_policy $a ACCEPT - - ${iptables_bin} -F -t $a - ${iptables_bin} -X -t $a - done - eend $? -} - -reload() { - checkkernel || return 1 - ebegin "Flushing firewall" - local a - for a in $(cat ${iptables_proc}) ; do - ${iptables_bin} -F -t $a - ${iptables_bin} -X -t $a - done - eend $? - - start -} - -save() { - ebegin "Saving ${iptables_name} state" - touch "${iptables_save}" - chmod 0600 "${iptables_save}" - ${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}" - eend $? -} - -panic() { - checkkernel || return 1 - service_started ${iptables_name} && svc_stop - - local a - ebegin "Dropping all packets" - for a in $(cat ${iptables_proc}) ; do - ${iptables_bin} -F -t $a - ${iptables_bin} -X -t $a - - set_table_policy $a DROP - done - eend $? -} |