#!/bin/sh

# uruk-save - directly dump /etc/uruk/rc to an iptables-save style
#                  file, without invoking iptables

# this file maintained using arch at http://arch.gna.org/uruk/

# Copyright (C) 2005 Joost van Baal
#
# This file is part of Uruk.  Uruk is free software; you can redistribute
# it and/or modify it under the terms of the GNU GPL, see the file named
# COPYING.

echo -n "# Generated by uruk-save on "
date

cat <<EOT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
EOT

if test "$1" = "-6"
then
    URUK_IPTABLES=':' URUK_IP6TABLES='echo [0:0]' uruk
else
    URUK_IPTABLES='echo [0:0]' URUK_IP6TABLES=':' uruk
fi

echo "COMMIT"
echo -n "# Completed on "
date

