LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 03-09-2006, 02:07 AM   #1
BillGates
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
Question Startup Scripts Question


I have a firewall text file, in which every time my system starts up I copy the firewall text, then past it into the root terminal. Then, I am happily protected by a firewall!

The only problem is that I would not like to do this. I would rather have my firewall start via a startup script automatically. So, can I just edit some file and paste my startup script in there? What exactly should I do?
 
Old 03-09-2006, 06:07 AM   #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
I would rather have my firewall start via a startup script automatically. So, can I just edit some file and paste my startup script in there? What exactly should I do?
On RH*L(-alike) systems, if the iptables package is installed you should have
- an initscript which should be set to run in the runlevels you boot into: check with "chkconfig --list iptables" and your current runlevel is displayed by running "runlevel". If chkconfig doesn't show it to run in the runlevel you're in, run "chkconfig --level LEVEL iptables on" where LEVEL is/are the runlevels it should be on in. If you need it for multiple ones don't use spaces but use "--level 2345".
- a service configuration script /etc/sysconfig/iptables-config which should show options like IPTABLES_SAVE_ON_STOP= and IPTABLES_SAVE_ON_RESTART=. If the script you're running manually is mature enough and you don't want any changes set these options to "no".
- an iptables rules file /etc/sysconfig/iptables. Run your script manually and issue "/sbin/iptables-save > /etc/sysconfig/iptables" which will populate the rules file. You can check it out to see how your rules are saved and edit it if necessary.

Now all is set. Since you manually entered your rules you should not need to restart the firewall. Run "/etc/rc.d/init.d/iptables status" or "service iptables status" or "/sbin/iptables -n -L -v" to check all rules are loaded. On reboot all your rules should be loaded automagically.
 
Old 03-09-2006, 08:58 PM   #3
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
The default SuSE install has an excellent operating firewall. YaST configuration of services automatically updates the firewall. There's a command line utility available called nmap that will tell you which ports are open by trial and error.
 
  


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
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 12:55 AM
Startup Scripts?? jimbo-62 Debian 5 07-10-2005 10:23 AM
Question about Bash startup scripts in BLFS 6 fdt93 Linux From Scratch 2 04-08-2005 10:08 AM
Startup Scripts jhartney Linux - Newbie 3 01-07-2005 01:35 AM
The wide world of scripts run at startup, big question here SrConchiwa Linux - General 5 07-18-2003 08:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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