Slackware-13.37-Hacks-UFW
Posted 09-18-2011 at 09:11 PM by arniekat
Uncomplicated Firewall
Get the SlackBuild Tarball for Slackware 13.1 from SlackBuilds.org. It will be for ufw version 0.27. Go to https://launchpad.net/ufw and download the ufw-0.30.1.tar.gz source code. After untarring the SlackBuild tarball, open the ufw.SlackBuild with a text editor and change the version to 0.30.1, like so:
PRGNAM=ufw
VERSION=${VERSION:-0.30.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
Save the SlackBuild with the changes, compile the package, and install it.
The startup scripts for Slackware 13.37 check to see if you have a file called /etc/rc.d/rc.firewall
If this file exists and is executable, the startup script runs it. You can put the raw iptables commands here, but I put the commands to startup the ufw firewall tool and it worked fine. Create the file /etc/rc.d/rc.firewall
# vi /etc/rc.d/rc.firewall
and place the following in it:
#!/bin/sh
# /etc/rc.d/rc.firewall
# This file is for Slackware 13.37 to enable the UFW application
# to run at boot-time. Be sure this file is executable, like so:
# chmod +x /etc/rc.d/rc.firewall
ufw enable
Save the file, exit, and make the file executable.
# chmod +x /etc/rc.d/rc.firewall
Now, you can either reboot to start the firewall or do it manually with:
# ufw enable
Firewall is active and enabled on system startup
ufw is set by default to a default deny policy, which means that your machine will not allow incoming connections to your machine. This setup will allow your browser to make connections outbound to the Internet. If you need to allow certain incoming connections to your machine, put these commands before the "ufw enable" line in the file /etc/rc.d/rc.firewall (See ufw manpages). To check the status of the firewall:
# ufw status
Status: active
If you decide you do not want to run the firewall at boot-time, just take away the executable bit from the script:
# chmod -x /etc/rc.d/rc.firewall
Get the SlackBuild Tarball for Slackware 13.1 from SlackBuilds.org. It will be for ufw version 0.27. Go to https://launchpad.net/ufw and download the ufw-0.30.1.tar.gz source code. After untarring the SlackBuild tarball, open the ufw.SlackBuild with a text editor and change the version to 0.30.1, like so:
PRGNAM=ufw
VERSION=${VERSION:-0.30.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
Save the SlackBuild with the changes, compile the package, and install it.
The startup scripts for Slackware 13.37 check to see if you have a file called /etc/rc.d/rc.firewall
If this file exists and is executable, the startup script runs it. You can put the raw iptables commands here, but I put the commands to startup the ufw firewall tool and it worked fine. Create the file /etc/rc.d/rc.firewall
# vi /etc/rc.d/rc.firewall
and place the following in it:
#!/bin/sh
# /etc/rc.d/rc.firewall
# This file is for Slackware 13.37 to enable the UFW application
# to run at boot-time. Be sure this file is executable, like so:
# chmod +x /etc/rc.d/rc.firewall
ufw enable
Save the file, exit, and make the file executable.
# chmod +x /etc/rc.d/rc.firewall
Now, you can either reboot to start the firewall or do it manually with:
# ufw enable
Firewall is active and enabled on system startup
ufw is set by default to a default deny policy, which means that your machine will not allow incoming connections to your machine. This setup will allow your browser to make connections outbound to the Internet. If you need to allow certain incoming connections to your machine, put these commands before the "ufw enable" line in the file /etc/rc.d/rc.firewall (See ufw manpages). To check the status of the firewall:
# ufw status
Status: active
If you decide you do not want to run the firewall at boot-time, just take away the executable bit from the script:
# chmod -x /etc/rc.d/rc.firewall
Total Comments 0