LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 10-09-2004, 12:04 PM   #1
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
firewall initialization script


Hi,
Please tell me if I did right in starting my firewall: I edited the /etc/rc.d/rc.M script. At the top of the file I added:

if [ -x /etc/rc.d/firewall.init ]; then
/etc/rc.d/firewall.init
fi

where firewall.init is my iptables rules script.

Is this a good solution for running my firewall script before starting the network interface? Could I do in this in another way?


Thanks for your help,
ddaas
 
Old 10-09-2004, 01:32 PM   #2
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
It is generally called from /etc/rc.d/rc.inet2, but i'm sure yours is fine.

If you look in rc.inet2 I think you will find something like your entry looking for rc.firewall. I use guarddog, which puts its iptables rules in /etc/rc.firewall, so I just modified the entry to point there.

rc.M calls rc.inet2 so it is not to important I guess

tobyl
 
Old 10-09-2004, 01:55 PM   #3
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
I think you should put it in inet2 or simply name the file /etc/rc.d/rc.firewall (which will be called automatically), because hotplug runs in rc.M so maybe your card isn't even recognized before you run the firewall script.
Also, you can put it in /etc/rc.d/rc.local which is there for users to run their own scripts (this one is called after all the init scripts).

Last edited by gbonvehi; 10-09-2004 at 01:58 PM.
 
Old 10-09-2004, 03:46 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
because hotplug runs in rc.M so maybe your card isn't even recognized before you run the firewall script.
Unless I'm entirely mistaken (always a possibility), you don't need to have an active interface for a firewall to run. In fact I personally think it is a good idea to have a firewall in place before the card gets activated, that way there is no lag time between when your card comes up and when the firewall comes up. No sense giving the bad guys any more opportunities than they already have.
 
  


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
Where should this firewall script be placed? wardialer Linux - Security 84 02-14-2005 07:06 PM
Script with root rights on startup - swap space initialization TroelsSmit Linux - Newbie 4 06-30-2004 11:58 PM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM
Firewall script help!!!! cirkut5732 Linux - Newbie 8 04-17-2003 06:09 PM
Could you look over my firewall script please... Grim Reaper Linux - Networking 8 03-26-2003 03:33 AM

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

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