mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
network/ufw: Tweaked README and SlackBuild.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
parent
531b78e2bf
commit
c678d47d93
2 changed files with 31 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue