LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-25-2012, 05:37 AM   #1
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Rep: Reputation: 50
Simple firewall for slackware


Based on robby workman firewall script and some google search I write a small script that provides a basic firewall system for slackware.

I attach my script to this post rc.firewall.txt.
Just copy it to /etc/rc.d remove .txt from the script name and reboot.

Hope it helps some of you.
 
Old 10-25-2012, 09:28 PM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
If you Google search AlienBOB's website he has an Easy Firewall Generator script builder most people use.
 
Old 10-26-2012, 01:31 AM   #3
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 530

Rep: Reputation: Disabled
Don't forget about ip6tables too if you have IPv6 enabled in the kernel.
 
Old 10-26-2012, 03:32 AM   #4
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by ReaperX7 View Post
If you Google search AlienBOB's website he has an Easy Firewall Generator script builder most people use.
Yes I also know that site

The idea is to give a lot of choices for slackware users.
They can decide what is more comfortable for them.
 
2 members found this post helpful.
Old 10-26-2012, 06:01 AM   #5
commandlinegamer
Member
 
Registered: Dec 2007
Posts: 163

Rep: Reputation: 51
I use firehol which is fairly straightforward (I just couldn't be bothered spending any more time on the ins and outs of iptables), though I don't think there's been any updates recently, and you need to make sure you provide it with a correct list of reserved IPs as the inbuilt one is quite out of date.

firehol.sourceforge.net
 
Old 10-26-2012, 09:36 AM   #6
irgunII
Member
 
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 383

Rep: Reputation: 72
Shorewall is a good one too. Not too difficult to install if you simply read the instructions (if I can do it, anyone can...literally!).

http://www.shorewall.net/
 
Old 10-26-2012, 11:11 AM   #7
basil_brush
LQ Newbie
 
Registered: Oct 2012
Posts: 25

Rep: Reputation: Disabled
In the Op's script IPT=$(which iptables) ...or even the command at bash prompt doesn't work? ..I use ALienBoB's firewall generator, but was curious why it doesn't work?
Using whereis iptables does?

Forget that...it does, don't know what I was doing wrong.

I now know, I wasn't root.

A question though, why does whereis work and not which work as user?

Last edited by basil_brush; 10-26-2012 at 11:19 AM.
 
Old 10-26-2012, 01:23 PM   #8
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Quote:
Originally Posted by basil_brush View Post
...A question though, why does whereis work and not which work as user?
'which' searches the user's path for the first direct binary hit. iptables is in /usr/sbin/, which isn't in a normal user's path.

cheers,
 
  


Reply

Tags
firewall, iptables



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Slackware vs simple Arch vs simple Frugalware punchy71 Linux - Distributions 2 08-28-2012 02:30 PM
simple firewall jeempc *BSD 16 10-10-2004 10:17 PM
simple firewall for dial up modem (Slackware 10) aus9 Linux - Security 3 08-28-2004 01:09 PM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM
simple firewall questions jamaso Linux - Security 5 08-28-2002 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:33 AM.

Main Menu
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