LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-02-2004, 06:25 AM   #1
fazzy
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
Question Learning IPTables on RedHat 9


Hi;

I am trying to learn iptables using RedHat 9. I have installed RedHat without the GUI and also without a firewall. How do I start iptables from the command line? (I have tried service iptables start but that didn't work, I also don't have iptables in the sysconfig dir)

When I type iptables -L it displays the firewall rules (empty of course). When I add a rule to it and reset my box it seems to flush all the rules and sets it as what was the default, i.e. accept everything.

Thanks.
 
Old 11-02-2004, 07:40 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You don't start iptables like Mozilla or any other program. You use it to change the current rules. In fact, it changes the kernel configuration.

When you reboot, your current rules are lost. That's normal. That's why you'll want to have so called firewalling script. It's just a list of commands with all your rules. If you add it to the starting scripts, it'll run every boot what results in rules set up as you wish when your computer boots.

How to make such script? Copy all your iptables commands to one file (in the forum you run them and in the right order) and save it for example as firewall.sh. Then you can run it from one of starting scripts (/etc/rc.local or use skeleton script you should be able to find somewhere in /etc/init.d to make it in such a form that you can pass commands like 'start' or 'stop'). If you choose to have it in the second form, copy your work to /etc/init.d (as 'firewall', for example) and then use system tools to register it as service and run at the runlevels you choose.

Was it clear enough? I'm not 100% sure it was..
 
Old 11-02-2004, 09:28 AM   #3
fazzy
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0
I got the script working fine. Thanks.
 
  


Reply



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
which book is good for redhat linux 9 learning alwaysnewbie Linux - Newbie 3 09-07-2004 10:59 AM
Learning Linux RedHat 7.0 - mail and firewall server Jorge_Beteta Linux - Newbie 1 09-18-2003 03:27 PM
best book for learning general things about (not specific topic) redhat 9.0 chinmay nautiya Linux - Software 6 07-03-2003 01:02 PM
best book for learning redhat 9.0 chinmay nautiya Linux - Software 2 07-01-2003 12:41 PM
learning iptables linowes Linux - Networking 3 02-19-2003 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:00 PM.

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