From 5b6001da4905fe1ee47c4a39d730c2aa44a98b57 Mon Sep 17 00:00:00 2001 From: Ricardson Williams Date: Sun, 28 Jul 2013 12:03:23 -0500 Subject: network/ufw: Added (Uncomplicated Firewall) Signed-off-by: Erik Hanson --- network/ufw/README | 24 +++++++++++++ network/ufw/slack-desc | 19 ++++++++++ network/ufw/ufw-0.33-conntrack.patch.gz | Bin 0 -> 2304 bytes network/ufw/ufw.SlackBuild | 62 ++++++++++++++++++++++++++++++++ network/ufw/ufw.conf.patch.gz | Bin 0 -> 322 bytes network/ufw/ufw.info | 10 ++++++ 6 files changed, 115 insertions(+) create mode 100644 network/ufw/README create mode 100644 network/ufw/slack-desc create mode 100644 network/ufw/ufw-0.33-conntrack.patch.gz create mode 100644 network/ufw/ufw.SlackBuild create mode 100644 network/ufw/ufw.conf.patch.gz create mode 100644 network/ufw/ufw.info (limited to 'network/ufw') diff --git a/network/ufw/README b/network/ufw/README new file mode 100644 index 0000000000..a961024e11 --- /dev/null +++ b/network/ufw/README @@ -0,0 +1,24 @@ +Ufw (Uncomplicated Firewall) is program for managing a netfilter firewall. +It provides a command line interface and aims to be uncomplicated and easy +to use. It is not intended to provide a complete firewall functionality via +its command interface, but provides an easy way to add or remove simple rules. + +To run ufw at boot you can add the following code to rc.local file: + +if [ -x /etc/init.d/ufw ]; then +/etc/init.d/ufw start +fi + +Rules can be added with ports, services or application names. To specify an +application you need a profile stored under /etc/ufw/applications.d directory. + +To add a profile create a app_name.INI file as the following: + +[Samba] +title=File/printer server for Unix +description=Samba is a collection of programs that implements the SMB/CIFS protocol for unix systems. +ports=137,138/udp|139,445/tcp + +Then, for example you can run: +ufw allow from xx.xx.xx.xx app samba + diff --git a/network/ufw/slack-desc b/network/ufw/slack-desc new file mode 100644 index 0000000000..39e501dc90 --- /dev/null +++ b/network/ufw/slack-desc @@ -0,0 +1,19 @@ +IT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +ufw: ufw (Uncomplicated Firewall) +ufw: +ufw: Ufw is a program for managing a netfilter firewall. It provide a +ufw: command line interface and aims to be uncomplicated and easy to use. +ufw: +ufw: Homepage: https://launchpad.net/ufw +ufw: +ufw: +ufw: +ufw: +ufw: diff --git a/network/ufw/ufw-0.33-conntrack.patch.gz b/network/ufw/ufw-0.33-conntrack.patch.gz new file mode 100644 index 0000000000..36b67b2ac2 Binary files /dev/null and b/network/ufw/ufw-0.33-conntrack.patch.gz differ diff --git a/network/ufw/ufw.SlackBuild b/network/ufw/ufw.SlackBuild new file mode 100644 index 0000000000..13c2118658 --- /dev/null +++ b/network/ufw/ufw.SlackBuild @@ -0,0 +1,62 @@ +#!/bin/sh +# Slackware build script for ufw +# Written by Marco Cecchetti (mrc.ildp@gmail.com) + +PRGNAM=ufw +VERSION=${VERSION:-0.33} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +zcat $CWD/ufw-0.33-conntrack.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/ufw.conf.patch.gz | patch -p1 --verbose || exit 1 + +python ./setup.py install --root=$PKG + +mv $PKG/usr/share/man $PKG/usr/man + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/etc/init.d + +ln -s /lib/ufw/ufw-init $PKG/etc/init.d/ufw + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS ChangeLog* COPYING README* TODO doc/*.example \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/ufw/ufw.conf.patch.gz b/network/ufw/ufw.conf.patch.gz new file mode 100644 index 0000000000..220a20b03a Binary files /dev/null and b/network/ufw/ufw.conf.patch.gz differ diff --git a/network/ufw/ufw.info b/network/ufw/ufw.info new file mode 100644 index 0000000000..98266963d8 --- /dev/null +++ b/network/ufw/ufw.info @@ -0,0 +1,10 @@ +PRGNAM="ufw" +VERSION="0.33" +HOMEPAGE="https://launchpad.net/ufw" +DOWNLOAD="https://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz" +MD5SUM="3747b453d76709e5a99da209fc0bb5f5" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Ricardson Williams" +EMAIL="ricardsonwilliams@gmail.com" -- cgit v1.2.3