LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-01-2011, 06:07 AM   #1
NoStressHQ
Member
 
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 313

Rep: Reputation: 106Reputation: 106
[Work in progress] New command line Firewall generator proposal.


Hi all,

It's been a while I was thinking about that, so last night I started the development of a firewall script generator, inspired from the one available on AlienBob's site (and Slackware one).

Why ? Just because I wanted to be able to specify simple rules in a file, like this:

Code:
accept in/tcp[20]	ftp-client	# FTP Client
accept in/tcp[21]	ftp-server	# FTP Server
accept in/tcp[22]	sshd		# SSH Server.
And to be able to automate the whole thing in scripts (maybe one day include it in the startup script or something like that). Also I found this way far more easy when working on remote server through ssh, and more flexible to fine tune the firewall instead of going through a web page.

So here it is, as a warning: it's obviously early work in progress, but it nearly does the job as I wanted. So I provide the fresh baby to you guys, in hope that some of you will find this useful.

Edit: Updated archive !
No more development mode (read README.txt and Changelog.txt)

The bloody archive

The pile of warnings for work in progress are more there to hide the ugly way it is right now, not all features are there, the documentation is poor, on the other hand it should be quite simple to use for most of you. It's quite documented, and even take the time to write a little doc in the hurry .

Of course don't hesitate to give some feedback, and if my english is too clumsy, I'd be happy to improve my documentation and messages.

I hope someday to be able to provide a full NAT access, it shouldn't be difficult, but I've spend more than 12 hours non-stop on the task, so at this moment, I'm a bit tired for that .

I don't promise I'll update that everyday, but I'll try to do my best.

If the core Slackware team (Pat, AlienBob, ...) have some advices, requests or ideas for improvement, I think it might even be interesting to add it in "/extra" someday, as I suspect this would be a wish for some Slackers, and maybe improve first steps accessibility to newbies, having a firewall nearly 'out of the box'. Obviously it'll require a better packaging.

Enjoy!

Garry.

PS/ Sorry if some things are a bit blurry, I'm on my 26hours without sleep... Yes Slackware geek addiction...

Last edited by NoStressHQ; 08-16-2011 at 01:14 PM.
 
Old 08-01-2011, 06:26 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,566

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
I've never seen this in a bash file before:

Code:
	if (( $compactMode )) ; then
		# stuff
	else
		# other stuff
	fi
Namely the (( )) part of the if test. Is that documented somewhere? On my system, the built-in is [[ ]].
 
Old 08-01-2011, 06:38 AM   #3
NoStressHQ
Member
 
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 313

Original Poster
Rep: Reputation: 106Reputation: 106
Yes it's an arithmetic evaluation: http://www.gnu.org/software/bash/man...nal-Constructs

It's to have a kind of 'Boolean test more natural in a mathematical sense (a bit like the C language evaluation of 0 as false and !0 as true...).

Although I might be wrong on the theoretical side, but that thing works, I tested it a lot last night .
 
Old 08-01-2011, 09:55 AM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,566

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
Oh, I didn't doubt that you had tested it; I was just unfamiliar with the syntax.
 
Old 08-16-2011, 01:12 PM   #5
NoStressHQ
Member
 
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 313

Original Poster
Rep: Reputation: 106Reputation: 106
Update

A new version is available here: Updated archive.

Well I didn't have any feedback, so is it really interesting for anybody ?

I understand this not the kind of thing you use everyday, but some feedback would be appreciated.

Also if someone needs a NAT service (which I don't), I'd be happy to work with you, in order to implement this features.

News:
- names have been changed (improved).
- now there's an installer (which is a standalone project itself but usefull here ).
- no more "development mode" by default.
- doc updated (README.txt).
- minor improvements (check the changelog).

Thanks !

Garry.

PS/ Sorry I'm not strong with explaining things in documentations, I'd be happy to improve it with your feedback, again .

Edit: btw, it seems it's working well for my usage and needs for now, yet I did some modifications that might change usage on different systems, I hope I didn't brake anything since the first version...

Last edited by NoStressHQ; 08-16-2011 at 02:45 PM.
 
  


Reply

Tags
command line, firewall, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Command line progress bar for copying Maverick1182 Linux - Newbie 6 03-03-2012 01:55 AM
GUI generator for command line programs? pandasuit Linux - Software 5 01-16-2011 05:55 PM
Is it possible to see a progress bar when I move files with the command line? baldurpet Linux - Software 2 01-22-2009 09:49 AM
Command-line progress meter in C++ JMJ_coder Programming 12 03-18-2008 01:31 PM
written command line password generator lepricaun Programming 6 08-11-2004 01:36 AM


All times are GMT -5. The time now is 05:03 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration