[arch-commits] Commit in iptables/repos (23 files)

Allan McRae allan at archlinux.org
Sat Apr 21 19:34:43 EDT 2012


    Date: Saturday, April 21, 2012 @ 19:34:43
  Author: allan
Revision: 156635

db-move: moved iptables from [testing] to [core] (x86_64)

Added:
  iptables/repos/core-x86_64/PKGBUILD
    (from rev 156633, iptables/repos/testing-x86_64/PKGBUILD)
  iptables/repos/core-x86_64/empty-filter.rules
    (from rev 156633, iptables/repos/testing-x86_64/empty-filter.rules)
  iptables/repos/core-x86_64/empty-mangle.rules
    (from rev 156633, iptables/repos/testing-x86_64/empty-mangle.rules)
  iptables/repos/core-x86_64/empty-nat.rules
    (from rev 156633, iptables/repos/testing-x86_64/empty-nat.rules)
  iptables/repos/core-x86_64/empty-raw.rules
    (from rev 156633, iptables/repos/testing-x86_64/empty-raw.rules)
  iptables/repos/core-x86_64/empty-security.rules
    (from rev 156633, iptables/repos/testing-x86_64/empty-security.rules)
  iptables/repos/core-x86_64/empty.rules
    (from rev 156633, iptables/repos/testing-x86_64/empty.rules)
  iptables/repos/core-x86_64/ip6tables
    (from rev 156633, iptables/repos/testing-x86_64/ip6tables)
  iptables/repos/core-x86_64/iptables
    (from rev 156633, iptables/repos/testing-x86_64/iptables)
  iptables/repos/core-x86_64/iptables.conf.d
    (from rev 156633, iptables/repos/testing-x86_64/iptables.conf.d)
  iptables/repos/core-x86_64/simple_firewall.rules
    (from rev 156633, iptables/repos/testing-x86_64/simple_firewall.rules)
Deleted:
  iptables/repos/core-x86_64/PKGBUILD
  iptables/repos/core-x86_64/empty-filter.rules
  iptables/repos/core-x86_64/empty-mangle.rules
  iptables/repos/core-x86_64/empty-nat.rules
  iptables/repos/core-x86_64/empty-raw.rules
  iptables/repos/core-x86_64/empty-security.rules
  iptables/repos/core-x86_64/empty.rules
  iptables/repos/core-x86_64/ip6tables
  iptables/repos/core-x86_64/iptables
  iptables/repos/core-x86_64/iptables.conf.d
  iptables/repos/core-x86_64/simple_firewall.rules
  iptables/repos/testing-x86_64/

-----------------------+
 PKGBUILD              |  150 +++++++++++++++++++++++-------------------------
 empty-filter.rules    |   12 +--
 empty-mangle.rules    |   16 ++---
 empty-nat.rules       |   14 ++--
 empty-raw.rules       |   10 +--
 empty-security.rules  |   12 +--
 empty.rules           |   12 +--
 ip6tables             |  138 ++++++++++++++++++++++----------------------
 iptables              |  136 +++++++++++++++++++++----------------------
 iptables.conf.d       |   24 +++----
 simple_firewall.rules |   22 +++----
 11 files changed, 272 insertions(+), 274 deletions(-)

Deleted: core-x86_64/PKGBUILD
===================================================================
--- core-x86_64/PKGBUILD	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/PKGBUILD	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,76 +0,0 @@
-# $Id$
-# Maintainer: Ronald van Haren <ronald.archlinux.org>
-# Contributor: Thomas Baechler <thomas at archlinux.org>
-
-pkgname=iptables
-pkgver=1.4.12.2
-pkgrel=1
-pkgdesc='Linux kernel packet control tool'
-arch=('i686' 'x86_64')
-license=('GPL2')
-url='http://www.netfilter.org/projects/iptables/index.html'
-depends=('glibc' 'bash')
-makedepends=('linux-api-headers')
-options=('!libtool')
-source=("http://www.iptables.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2"
-        iptables
-        ip6tables
-        empty.rules
-        simple_firewall.rules
-        iptables.conf.d
-        empty-filter.rules
-        empty-mangle.rules
-        empty-nat.rules
-        empty-raw.rules
-        empty-security.rules)
-backup=(etc/conf.d/iptables)
-sha1sums=('4dc8cdf1b711b23ed88eaaaa0e0e157d2bf2d81c'
-          '5bb6fa526665cdd728c26f0f282f5a51f220cf88'
-          '2db68906b603e5268736f48c8e251f3a49da1d75'
-          '83b3363878e3660ce23b2ad325b53cbd6c796ecf'
-          '9907f9e815592837abc7fa3264a401567b7606ab'
-          'cdb830137192bbe002c6d01058656bd053ed0ddd'
-          'd9f9f06b46b4187648e860afa0552335aafe3ce4'
-          'c45b738b5ec4cfb11611b984c21a83b91a2d58f3'
-          '1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6'
-          '7db53bb882f62f6c677cc8559cff83d8bae2ef73'
-          'ebbd1424a1564fd45f455a81c61ce348f0a14c2e')
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-
-  # http://bugs.archlinux.org/task/17046
-  sed -i '87 i libxt_RATEEST.so: libxt_RATEEST.oo' extensions/GNUmakefile.in
-  sed -i '88 i \\t${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -lm -shared ${LDFLAGS} -o $@ $<;\n' extensions/GNUmakefile.in
-
- # FS#25358: libxt_statistic.so undefined symbol: lround 
- export LDFLAGS='-lm'
-
- ./configure --prefix=/usr \
-     --libexecdir=/usr/lib/iptables --sysconfdir=/etc \
-     --with-xtlibdir=/usr/lib/iptables \
-     --enable-devel --enable-libipq \
-     --enable-shared --enable-static 
-# build fails when not enabling static, see if we can remove it on next build
-
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-
-  unset CFLAGS
-  unset LDFLAGS
-
-  make DESTDIR="${pkgdir}" install
-
-  cd "${srcdir}"
-  install -D -m755 iptables "${pkgdir}"/etc/rc.d/iptables
-  install -D -m755 ip6tables "${pkgdir}"/etc/rc.d/ip6tables
-  install -D -m644 empty.rules "${pkgdir}"/etc/iptables/empty.rules
-  install -D -m644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules
-  install -D -m644 iptables.conf.d "${pkgdir}"/etc/conf.d/iptables
-
-  mkdir -p "${pkgdir}"/var/lib/iptables
-  install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables
-}

Copied: iptables/repos/core-x86_64/PKGBUILD (from rev 156633, iptables/repos/testing-x86_64/PKGBUILD)
===================================================================
--- core-x86_64/PKGBUILD	                        (rev 0)
+++ core-x86_64/PKGBUILD	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,74 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Thomas Baechler <thomas at archlinux.org>
+
+pkgname=iptables
+pkgver=1.4.13
+pkgrel=1
+pkgdesc='Linux kernel packet control tool'
+arch=('i686' 'x86_64')
+license=('GPL2')
+url='http://www.netfilter.org/projects/iptables/index.html'
+depends=('glibc' 'bash')
+makedepends=('linux-api-headers')
+options=('!libtool')
+source=("http://www.iptables.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2"
+        iptables
+        ip6tables
+        empty.rules
+        simple_firewall.rules
+        iptables.conf.d
+        empty-filter.rules
+        empty-mangle.rules
+        empty-nat.rules
+        empty-raw.rules
+        empty-security.rules)
+backup=(etc/conf.d/iptables)
+sha1sums=('bf1f1896e052d1813a7c96fa70f88be8dab3ff86'
+          '5bb6fa526665cdd728c26f0f282f5a51f220cf88'
+          '2db68906b603e5268736f48c8e251f3a49da1d75'
+          '83b3363878e3660ce23b2ad325b53cbd6c796ecf'
+          '9907f9e815592837abc7fa3264a401567b7606ab'
+          'cdb830137192bbe002c6d01058656bd053ed0ddd'
+          'd9f9f06b46b4187648e860afa0552335aafe3ce4'
+          'c45b738b5ec4cfb11611b984c21a83b91a2d58f3'
+          '1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6'
+          '7db53bb882f62f6c677cc8559cff83d8bae2ef73'
+          'ebbd1424a1564fd45f455a81c61ce348f0a14c2e')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # http://bugs.archlinux.org/task/17046
+  sed -i '87 i libxt_RATEEST.so: libxt_RATEEST.oo' extensions/GNUmakefile.in
+  sed -i '88 i \\t${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -lm -shared ${LDFLAGS} -o $@ $<;\n' extensions/GNUmakefile.in
+
+  # use system one
+  rm include/linux/types.h
+
+ ./configure --prefix=/usr \
+     --libexecdir=/usr/lib/iptables --sysconfdir=/etc \
+     --with-xtlibdir=/usr/lib/iptables \
+     --enable-devel --enable-libipq \
+     --enable-shared --enable-static 
+# build fails when not enabling static, see if we can remove it on next build 
+# 1.4.13 still fails
+
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make DESTDIR="${pkgdir}" install
+
+  cd "${srcdir}"
+  install -D -m755 iptables "${pkgdir}"/etc/rc.d/iptables
+  install -D -m755 ip6tables "${pkgdir}"/etc/rc.d/ip6tables
+  install -D -m644 empty.rules "${pkgdir}"/etc/iptables/empty.rules
+  install -D -m644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules
+  install -D -m644 iptables.conf.d "${pkgdir}"/etc/conf.d/iptables
+
+  mkdir -p "${pkgdir}"/var/lib/iptables
+  install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables
+}

Deleted: core-x86_64/empty-filter.rules
===================================================================
--- core-x86_64/empty-filter.rules	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/empty-filter.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,6 +0,0 @@
-# Empty iptables filter table rule file
-*filter
-:INPUT ACCEPT [0:0]
-:FORWARD ACCEPT [0:0]
-:OUTPUT ACCEPT [0:0]
-COMMIT

Copied: iptables/repos/core-x86_64/empty-filter.rules (from rev 156633, iptables/repos/testing-x86_64/empty-filter.rules)
===================================================================
--- core-x86_64/empty-filter.rules	                        (rev 0)
+++ core-x86_64/empty-filter.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,6 @@
+# Empty iptables filter table rule file
+*filter
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Deleted: core-x86_64/empty-mangle.rules
===================================================================
--- core-x86_64/empty-mangle.rules	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/empty-mangle.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,8 +0,0 @@
-# Empty iptables mangle table rules file
-*mangle
-:PREROUTING ACCEPT [0:0]
-:INPUT ACCEPT [0:0]
-:FORWARD ACCEPT [0:0]
-:OUTPUT ACCEPT [0:0]
-:POSTROUTING ACCEPT [0:0]
-COMMIT

Copied: iptables/repos/core-x86_64/empty-mangle.rules (from rev 156633, iptables/repos/testing-x86_64/empty-mangle.rules)
===================================================================
--- core-x86_64/empty-mangle.rules	                        (rev 0)
+++ core-x86_64/empty-mangle.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,8 @@
+# Empty iptables mangle table rules file
+*mangle
+:PREROUTING ACCEPT [0:0]
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+:POSTROUTING ACCEPT [0:0]
+COMMIT

Deleted: core-x86_64/empty-nat.rules
===================================================================
--- core-x86_64/empty-nat.rules	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/empty-nat.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,7 +0,0 @@
-# Empty iptables nat table rules file
-*nat
-:PREROUTING ACCEPT [0:0]
-:INPUT ACCEPT [0:0]
-:OUTPUT ACCEPT [0:0]
-:POSTROUTING ACCEPT [0:0]
-COMMIT

Copied: iptables/repos/core-x86_64/empty-nat.rules (from rev 156633, iptables/repos/testing-x86_64/empty-nat.rules)
===================================================================
--- core-x86_64/empty-nat.rules	                        (rev 0)
+++ core-x86_64/empty-nat.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,7 @@
+# Empty iptables nat table rules file
+*nat
+:PREROUTING ACCEPT [0:0]
+:INPUT ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+:POSTROUTING ACCEPT [0:0]
+COMMIT

Deleted: core-x86_64/empty-raw.rules
===================================================================
--- core-x86_64/empty-raw.rules	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/empty-raw.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,5 +0,0 @@
-# Empty iptables raw table rules file
-*raw
-:PREROUTING ACCEPT [0:0]
-:OUTPUT ACCEPT [0:0]
-COMMIT

Copied: iptables/repos/core-x86_64/empty-raw.rules (from rev 156633, iptables/repos/testing-x86_64/empty-raw.rules)
===================================================================
--- core-x86_64/empty-raw.rules	                        (rev 0)
+++ core-x86_64/empty-raw.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,5 @@
+# Empty iptables raw table rules file
+*raw
+:PREROUTING ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Deleted: core-x86_64/empty-security.rules
===================================================================
--- core-x86_64/empty-security.rules	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/empty-security.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,6 +0,0 @@
-# Empty iptables security table rules file
-*security
-:INPUT ACCEPT [0:0]
-:FORWARD ACCEPT [0:0]
-:OUTPUT ACCEPT [0:0]
-COMMIT

Copied: iptables/repos/core-x86_64/empty-security.rules (from rev 156633, iptables/repos/testing-x86_64/empty-security.rules)
===================================================================
--- core-x86_64/empty-security.rules	                        (rev 0)
+++ core-x86_64/empty-security.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,6 @@
+# Empty iptables security table rules file
+*security
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Deleted: core-x86_64/empty.rules
===================================================================
--- core-x86_64/empty.rules	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/empty.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,6 +0,0 @@
-# Empty iptables rule file
-*filter
-:INPUT ACCEPT [0:0]
-:FORWARD ACCEPT [0:0]
-:OUTPUT ACCEPT [0:0]
-COMMIT

Copied: iptables/repos/core-x86_64/empty.rules (from rev 156633, iptables/repos/testing-x86_64/empty.rules)
===================================================================
--- core-x86_64/empty.rules	                        (rev 0)
+++ core-x86_64/empty.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,6 @@
+# Empty iptables rule file
+*filter
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+COMMIT

Deleted: core-x86_64/ip6tables
===================================================================
--- core-x86_64/ip6tables	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/ip6tables	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,69 +0,0 @@
-#!/bin/bash
-
-# source application-specific settings
-[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
-
-# Set defaults if settings are missing
-[ -z "$IP6TABLES_CONF" ] && IP6TABLES_CONF=/etc/iptables/ip6tables.rules
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
-	start)
-		if [ ! -f "$IP6TABLES_CONF" ]; then
-			echo "Cannot load ip6tables rules: $IP6TABLES_CONF is missing!" >&2
-			exit 1
-		fi
-		stat_busy "Starting IP6 Tables"
-		if [ "$IPTABLES_FORWARD" = "1" ]; then
-			echo 1 >/proc/sys/net/ipv6/conf/default/forwarding
-			echo 1 >/proc/sys/net/ipv6/conf/all/forwarding
-		fi
-		if ck_daemon ip6tables; then
-			/usr/sbin/ip6tables-restore < $IP6TABLES_CONF
-			if [ $? -gt 0 ]; then
-				stat_fail
-			else
-				add_daemon ip6tables
-				stat_done
-			fi
-		else
-			stat_fail
-		fi
-		;;
-	stop)
-		stat_busy "Stopping IP6 Tables"
-		if ! ck_daemon ip6tables; then
-			fail=0
-			for table in $(cat /proc/net/ip6_tables_names); do
-				ip6tables-restore < /var/lib/iptables/empty-$table.rules
-				[ $? -gt 0 ] && fail=1
-			done
-			if [ $fail -gt 0 ]; then
-				stat_fail
-			else
-				rm_daemon ip6tables
-				stat_done
-			fi
-		else
-			stat_fail
-		fi
-		;;
-	restart)
-		$0 stop
-		$0 start
-		;;
-	save)
-		stat_busy "Saving IP6 Tables"
-		/usr/sbin/ip6tables-save >$IP6TABLES_CONF
-		if [ $? -gt 0 ]; then
-			stat_fail
-		else
-			stat_done
-		fi
-		;;
-	*)
-		echo "usage: $0 {start|stop|restart|save}"
-esac
-exit 0

Copied: iptables/repos/core-x86_64/ip6tables (from rev 156633, iptables/repos/testing-x86_64/ip6tables)
===================================================================
--- core-x86_64/ip6tables	                        (rev 0)
+++ core-x86_64/ip6tables	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
+
+# Set defaults if settings are missing
+[ -z "$IP6TABLES_CONF" ] && IP6TABLES_CONF=/etc/iptables/ip6tables.rules
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+	start)
+		if [ ! -f "$IP6TABLES_CONF" ]; then
+			echo "Cannot load ip6tables rules: $IP6TABLES_CONF is missing!" >&2
+			exit 1
+		fi
+		stat_busy "Starting IP6 Tables"
+		if [ "$IPTABLES_FORWARD" = "1" ]; then
+			echo 1 >/proc/sys/net/ipv6/conf/default/forwarding
+			echo 1 >/proc/sys/net/ipv6/conf/all/forwarding
+		fi
+		if ck_daemon ip6tables; then
+			/usr/sbin/ip6tables-restore < $IP6TABLES_CONF
+			if [ $? -gt 0 ]; then
+				stat_fail
+			else
+				add_daemon ip6tables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	stop)
+		stat_busy "Stopping IP6 Tables"
+		if ! ck_daemon ip6tables; then
+			fail=0
+			for table in $(cat /proc/net/ip6_tables_names); do
+				ip6tables-restore < /var/lib/iptables/empty-$table.rules
+				[ $? -gt 0 ] && fail=1
+			done
+			if [ $fail -gt 0 ]; then
+				stat_fail
+			else
+				rm_daemon ip6tables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	restart)
+		$0 stop
+		$0 start
+		;;
+	save)
+		stat_busy "Saving IP6 Tables"
+		/usr/sbin/ip6tables-save >$IP6TABLES_CONF
+		if [ $? -gt 0 ]; then
+			stat_fail
+		else
+			stat_done
+		fi
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart|save}"
+esac
+exit 0

Deleted: core-x86_64/iptables
===================================================================
--- core-x86_64/iptables	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/iptables	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,68 +0,0 @@
-#!/bin/bash
-
-# source application-specific settings
-[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
-
-# Set defaults if settings are missing
-[ -z "$IPTABLES_CONF" ] && IPTABLES_CONF=/etc/iptables/iptables.rules
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
-	start)
-		if [ ! -f "$IPTABLES_CONF" ]; then
-			echo "Cannot load iptables rules: $IPTABLES_CONF is missing!" >&2
-			exit 1
-		fi
-		stat_busy "Starting IP Tables"
-		if [ "$IPTABLES_FORWARD" = "1" ]; then
-			echo 1 >/proc/sys/net/ipv4/ip_forward
-		fi
-		if ck_daemon iptables; then
-			/usr/sbin/iptables-restore < $IPTABLES_CONF
-			if [ $? -gt 0 ]; then
-				stat_fail
-			else
-				add_daemon iptables
-				stat_done
-			fi
-		else
-			stat_fail
-		fi
-		;;
-	stop)
-		stat_busy "Stopping IP Tables"
-		if ! ck_daemon iptables; then
-			fail=0
-			for table in $(cat /proc/net/ip_tables_names); do
-				iptables-restore < /var/lib/iptables/empty-$table.rules
-				[ $? -gt 0 ] && fail=1
-			done
-			if [ $fail -gt 0 ]; then
-				stat_fail
-			else
-				rm_daemon iptables
-				stat_done
-			fi
-		else
-			stat_fail
-		fi
-		;;
-	restart)
-		$0 stop
-		$0 start
-		;;
-	save)
-		stat_busy "Saving IP Tables"
-		/usr/sbin/iptables-save >$IPTABLES_CONF
-		if [ $? -gt 0 ]; then
-			stat_fail
-		else
-			stat_done
-		fi
-		;;
-	*)
-		echo "usage: $0 {start|stop|restart|save}"
-esac
-exit 0

Copied: iptables/repos/core-x86_64/iptables (from rev 156633, iptables/repos/testing-x86_64/iptables)
===================================================================
--- core-x86_64/iptables	                        (rev 0)
+++ core-x86_64/iptables	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/iptables ] && . /etc/conf.d/iptables
+
+# Set defaults if settings are missing
+[ -z "$IPTABLES_CONF" ] && IPTABLES_CONF=/etc/iptables/iptables.rules
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+	start)
+		if [ ! -f "$IPTABLES_CONF" ]; then
+			echo "Cannot load iptables rules: $IPTABLES_CONF is missing!" >&2
+			exit 1
+		fi
+		stat_busy "Starting IP Tables"
+		if [ "$IPTABLES_FORWARD" = "1" ]; then
+			echo 1 >/proc/sys/net/ipv4/ip_forward
+		fi
+		if ck_daemon iptables; then
+			/usr/sbin/iptables-restore < $IPTABLES_CONF
+			if [ $? -gt 0 ]; then
+				stat_fail
+			else
+				add_daemon iptables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	stop)
+		stat_busy "Stopping IP Tables"
+		if ! ck_daemon iptables; then
+			fail=0
+			for table in $(cat /proc/net/ip_tables_names); do
+				iptables-restore < /var/lib/iptables/empty-$table.rules
+				[ $? -gt 0 ] && fail=1
+			done
+			if [ $fail -gt 0 ]; then
+				stat_fail
+			else
+				rm_daemon iptables
+				stat_done
+			fi
+		else
+			stat_fail
+		fi
+		;;
+	restart)
+		$0 stop
+		$0 start
+		;;
+	save)
+		stat_busy "Saving IP Tables"
+		/usr/sbin/iptables-save >$IPTABLES_CONF
+		if [ $? -gt 0 ]; then
+			stat_fail
+		else
+			stat_done
+		fi
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart|save}"
+esac
+exit 0

Deleted: core-x86_64/iptables.conf.d
===================================================================
--- core-x86_64/iptables.conf.d	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/iptables.conf.d	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,12 +0,0 @@
-# Configuration for iptables rules
-IPTABLES_CONF=/etc/iptables/iptables.rules
-IP6TABLES_CONF=/etc/iptables/ip6tables.rules
-
-# Enable IP forwarding (both IPv4 and IPv6)
-# NOTE: this is not the recommended way to do this, and is supported only for
-# backward compatibility. Instead, use /etc/sysctl.conf and set the following
-# options:
-# * net.ipv4.ip_forward=1
-# * net.ipv6.conf.default.forwarding=1
-# * net.ipv6.conf.all.forwarding=1
-#IPTABLES_FORWARD=0

Copied: iptables/repos/core-x86_64/iptables.conf.d (from rev 156633, iptables/repos/testing-x86_64/iptables.conf.d)
===================================================================
--- core-x86_64/iptables.conf.d	                        (rev 0)
+++ core-x86_64/iptables.conf.d	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,12 @@
+# Configuration for iptables rules
+IPTABLES_CONF=/etc/iptables/iptables.rules
+IP6TABLES_CONF=/etc/iptables/ip6tables.rules
+
+# Enable IP forwarding (both IPv4 and IPv6)
+# NOTE: this is not the recommended way to do this, and is supported only for
+# backward compatibility. Instead, use /etc/sysctl.conf and set the following
+# options:
+# * net.ipv4.ip_forward=1
+# * net.ipv6.conf.default.forwarding=1
+# * net.ipv6.conf.all.forwarding=1
+#IPTABLES_FORWARD=0

Deleted: core-x86_64/simple_firewall.rules
===================================================================
--- core-x86_64/simple_firewall.rules	2012-04-21 23:34:40 UTC (rev 156634)
+++ core-x86_64/simple_firewall.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -1,11 +0,0 @@
-*filter
-:INPUT DROP [0:0]
-:FORWARD DROP [0:0]
-:OUTPUT ACCEPT [0:0]
--A INPUT -p icmp -j ACCEPT 
--A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
--A INPUT -i lo -j ACCEPT 
--A INPUT -p tcp -j REJECT --reject-with tcp-reset 
--A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable 
--A INPUT -j REJECT --reject-with icmp-proto-unreachable 
-COMMIT

Copied: iptables/repos/core-x86_64/simple_firewall.rules (from rev 156633, iptables/repos/testing-x86_64/simple_firewall.rules)
===================================================================
--- core-x86_64/simple_firewall.rules	                        (rev 0)
+++ core-x86_64/simple_firewall.rules	2012-04-21 23:34:43 UTC (rev 156635)
@@ -0,0 +1,11 @@
+*filter
+:INPUT DROP [0:0]
+:FORWARD DROP [0:0]
+:OUTPUT ACCEPT [0:0]
+-A INPUT -p icmp -j ACCEPT 
+-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
+-A INPUT -i lo -j ACCEPT 
+-A INPUT -p tcp -j REJECT --reject-with tcp-reset 
+-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable 
+-A INPUT -j REJECT --reject-with icmp-proto-unreachable 
+COMMIT



More information about the arch-commits mailing list