LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 01-11-2005, 08:11 AM   #1
nirav.jani
Member
 
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
http://iptables-tutorial.frozentux.n...-tutorial.html

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

CONFIG_NETFILTER
CONFIG_PACKET etc...

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.
Nirav
 
Old 01-12-2005, 06:01 PM   #2
sludink
Member
 
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:
http://www.vectorsite.net/tsawk.html 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.
 
  


Reply


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


All times are GMT -5. The time now is 06:03 PM.

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