network/ufw: Tweaked README and SlackBuild.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Brenton Earl 2016-12-29 17:49:42 +00:00 committed by David Spencer
parent 531b78e2bf
commit c678d47d93
2 changed files with 31 additions and 14 deletions

View File

@ -1,24 +1,26 @@
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.
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.
To run ufw at boot you can add the following code to rc.local file:
Add the following code to /etc/rc.local to start Ufw at boot time:
if [ -x /lib/ufw/ufw-init ]; then
/lib/ufw/ufw-init start
/lib/ufw/ufw-init 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.
Ufw comes with a number of common application profiles. Create additional
application profiles under /etc/ufw/applications.d. Each profile should
contain a list of rules which include a title, description, and port(s) or
port range.
To add a profile create a app_name.INI file as the following:
A custom application profile should look similar to this:
[Samba]
title=File/printer server for Unix
description=Samba is a collection of programs that implements the SMB/CIFS protocol for unix systems.
[Application]
title=Application title
description=A description for the application.
ports=137,138/udp|139,445/tcp
Then, for example you can run:
ufw allow from xx.xx.xx.xx app samba
Where xx.xx.xx.xx is the IP address of an external host, enable this
application profile by executing the following as root:
# ufw allow from xx.xx.xx.xx app Application

View File

@ -43,6 +43,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
@ -73,6 +87,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS ChangeLog* COPYING README* TODO doc/*.example $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install