LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > arniekat
User Name
Password

Notices


Rate this Entry

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
Posted in Uncategorized
Views 2423 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration