Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 01-11-2005, 09:11 AM   #1
Registered: Nov 2004
Location: Hyderabad, India
Distribution: Fedora Core - II, RedHat - 9
Posts: 45

Rep: Reputation: 15
can I set these flags using a shell script

Hi all,
I am currently working on developing some firewall and all the security stuffs, I am referring once nice tutorial available on line
It is at

It is really a nice document for each and every security guy to go through once,

My problem lies with the kernel options we have to set while preparing our linux box for a firewall stuffs, ( this is the point number 2.2 -kernel setup in above online tutorial)

We have to enable various options while doing make config - this is the command we have to execute when we want to compile our kernel.

The kernel options are like


which we have to enable for firewall stuffs.

Is there any way out using a simple shell script to set all these kernel options ? rather than going through it one by one and setting it.

I want to do it with one script is it possible ? and how ?

I am somewhat new for linux ( 2-months only !!!) may be wrong somewhere.
Old 01-12-2005, 07:01 PM   #2
Registered: Jan 2005
Location: Brabant, the Netherlands
Distribution: Gentoo 2004.x (2.6.10 hardened)
Posts: 91

Rep: Reputation: 15
Yes, it's possible, I think; you're looking for regular expressions.
So take a look at a sed or even better, a gawk tutorial: is quite a good one.

For example, you could search for one line, print the first word before the tab, add '=yes' to the line, and get it printed between the other lines.
Also read the man pages of cut and paste, this may be of great use.

This is quite general, but I hope it helps.


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
Shell script inside shell script treotan Linux - General 4 02-19-2009 07:34 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 03:14 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 06:32 PM
Need shell script to set passwords for already created users naren_0101bits Programming 2 08-28-2005 03:02 PM
How do you set a shell script var with a literal '*'? BrianK Programming 3 06-22-2004 03:11 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:54 PM.

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