LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-28-2006, 01:34 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Question How to replace iptables by fwbuilder script ?


Hi there !

I am running FC5 and I build my own firewall rules with FWBuilder. The question is: Which is the _right_ way to replace the default iptables infrastructure (/etc/init.d/iptables, /etc/sysconfig/iptables, /etc/sysconfig/iptables-config) created by system-config-securitylevel by the fwbuilder's generated script ?
I mean, just disable firewall in system-config-securitylevel and put the fwbuilder script in place of /etc/init.d/iptables ? Simple like that ?

any ideas will be welcome,
 
Old 03-28-2006, 05:45 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
/etc/init.d/iptables = initscript, no changes necessary
/etc/sysconfig/iptables = iptables rules
/etc/sysconfig/iptables-config = iptabes config, logging, saving, etc., no changes necessary

Quite easy actually. Inspect your fwbuilder script because I dont know if it contains module loading, sysctl mangling etc, etc lines: sysctl goes to /etc/sysctl.conf, module loading goes on the fly. "/etc/init.d/iptables stop" to make the firewall return to default "ACCEPT" state, then load the rules by running the fwbuilder script if it is a shell script. Now run "/sbin/iptables-save > /etc/sysconfig/iptables.fwb" and inspect if OK. Copy /etc/sysconfig/iptables to /etc/sysconfig/iptables.old and symlink /etc/sysconfig/iptables.fwb to /etc/sysconfig/iptables and "/etc/init.d/iptables restart" to see if all goes well. Of course you don't have to copy and symlink, but it's nice if you want to revert w/o having to look for a backup.
 
Old 04-10-2006, 08:40 AM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499

Original Poster
Blog Entries: 2

Rep: Reputation: 68
Thumbs up Solved !

Yes ! It worked !

Thanks a lot and sorry the delay to give you a feedback. I was busy seting up a new server using fwbuilder and mixing it with your hints.

regards,
 
  


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
FWBuilder + iptables + fedora -> port forwarding the_reen Linux - Security 2 09-04-2004 12:34 PM
how to generate iptables script using fwbuilder Skunk_Face Linux - Security 1 04-23-2004 10:06 PM
Replace lines in script AMMullan Linux - Software 9 12-06-2003 11:36 PM
Snort, prelude, fwbuilder, bastille or iptables ? christophe.dr Linux - Security 5 10-28-2003 01:59 PM
FWBuilder Help: Can't get it to load script automatically on boot puma1824 Linux - Security 3 09-11-2003 09:20 PM

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

All times are GMT -5. The time now is 11:23 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