LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-01-2005, 10:30 PM   #1
jupiter3437
Member
 
Registered: May 2005
Distribution: fc3
Posts: 64

Rep: Reputation: 15
what mean's?


when i want to add the iptables to start up i must run this command
sudo update-rc.d iptables start 37 S . start 37 0 . start 37 6 .
what does it mean?
 
Old 10-02-2005, 03:25 AM   #2
d00bid00b
Member
 
Registered: Aug 2005
Location: London, UK
Distribution: Debian Testing
Posts: 157

Rep: Reputation: 31
I don't know what it means to be honest, because I don't know anything your system, nor when you are trying to get your iptables started. I was under the impression that if you have it set up properly they should be initialised upon boot up rather than wait for a manual boot up. The very best iptables firewall I have ever used (and I still use it on all my GNU/Linux boxes even though I run behind an OpenBSD dedicated firewall) is arno's iptables. It is simple to setup, comes with a log analyser and gives clear instructions. Just configure it as you need to (and if you are dial up or broadband/dsl it is a breeze - modify two or three lines in the default config file and you are off to the races), and load the rc.iptables in the correct start up file for your system and there you go, job done. You'll have to set it up as root first off course, since you are messing with the system, but after that it'll be initialised whenever you power up.
 
Old 10-02-2005, 05:09 PM   #3
jupiter3437
Member
 
Registered: May 2005
Distribution: fc3
Posts: 64

Original Poster
Rep: Reputation: 15
my distro is kubuntu....and i want to know what do the parameters of
update-rc.d iptables start 37 S . start 37 0 . start 37 6 .
do?
 
Old 10-02-2005, 06:00 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
ok i don't use ubuntu (debian) either but the command is running a utility called update-rc.d
this utility is designed appearently to controll the symbolic links that point to the scripts that run at boot.
for me i have a bunch of service startup scripts in /etc/rc.d/init.d
Code:
(gary) /etc/rc.d/init.d  $ cd ../
(06:48pm:10/02/05)
(gary) /etc/rc.d  $ ls
init.d  rc0.d  rc1.d  rc2.d  rc3.d  rc4.d  rc5.d  rc6.d  rcsysinit.d
(06:48pm:10/02/05)
debian has a directory named rcS.d which is most likely like my rcsysinit.d
this directory for me does the most basic startup stuff that all run levels need like mountswap startconsole udev mountfs setclock and basic junk like that.
these directories 0 thru 6 represent the 6 different run levels and contain symbolic links to the scripts in init.d.. the links are called S for start K for kill with a number for order. early numbers are processed first.
the init script (for me /etc/rc.d/init.d/rc) simply loops through the links
Code:
for i in $( ls -v $rc_base/rc$runlevel.d/S* 2> /dev/null)
do
perhaps your /etc/inittab has an explanation of your systems run levels and what they do in its comments.
anyway generally
0 = shutdown
6 = reboot
1 thru 5 are user befined boot modes
your system boots to "default" runlevel again see /etc/inittab
mine says
id:3:initdefault:
so mine boots to run level 3

hope that helps


Last edited by foo_bar_foo; 10-02-2005 at 06:08 PM.
 
Old 10-02-2005, 06:29 PM   #5
jdogpc
Member
 
Registered: Jul 2005
Location: Mafra, PT
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
Hi, I don't use Ubuntu but it appears to me that "update-rc.d iptables start 37 S . start 37 0 . start 37 6 " means:

Update /etc/rc.# so that the script to start iptables is run in the 37º place when you start your box.
start 37 S - start the script in 37º place on Startup.
start 37 0 - start the script in runlevel 0 - shutdown
start 37 6 - start the script in runlevel 6 - reboot.

Please excuse me if this completly wrong but as I said I don't use Ubuntu, but that is what I can figure out from the line you post.

In Fedora or RedHat I just do chkconfig --level #### iptables on / off.

In case of doubt just do a link from /etc/init.d/iptables to /etc/rc3.d/S37iptables or /etc/rc5.d/S37iptables if you want it or start automaticly on runlevel 3 or 5, also make a link from /etc/init.d/iptables to /etc/rc0.d/K37iptables and /etc/rc6.d/K37iptables to kill iptables on runlevel 0 (shutdown) and 6 (reboot).

Hope this is of any use even if I didn't make it right on your post, you can still do it manually.
 
Old 10-03-2005, 08:18 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Is sudo used as a default administraion tool in kubuntu? I wouldn't think so but I don't use that distro either.

My experience with sudo is that one has to create a sudoers file allowing specific commands on specific hosts by specific non-root users to run as root. Given that it would appear the command you're running is one that should be in your sudoers file.

1) Are you able to login as root? If not you should probably ask this question of whoever is the Systems Admin in your organization (the person who CAN login as root) as they likely set up the sudoers.

2) If you can login as root see if you have a sudoers file (find / -name sudoers -print) and look at it to see what its definition for "update-rc.d" is. This is likely a pointer to a shell script that you can examine to see exactly what it does.
 
Old 10-03-2005, 09:20 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Ubuntu uses sudo rather than su. Therefore, you don't need to know the root password.

Just do
Code:
sudo <command>
[enter your own password]
 
Old 10-07-2005, 04:12 PM   #8
jupiter3437
Member
 
Registered: May 2005
Distribution: fc3
Posts: 64

Original Poster
Rep: Reputation: 15
what does mean 37?
 
Old 10-07-2005, 08:24 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
It's just the ordinal in which the startup script will be run. Look at you /etc/rc.d/rcN.d directories (where N is a number between 0 and 6 for each of the runlevels on your system). Google for System V initialization if you want more details. Also,I don't use Ubuntu but I bet man update-rc.d will have some useful info for you.
 
Old 10-08-2005, 09:37 AM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
ignore this one please

Last edited by MensaWater; 10-08-2005 at 09:38 AM.
 
Old 10-08-2005, 09:37 AM   #11
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Thank God Unix "relies on the intelligence of users" - if it weren't for that I wouldn't be a highly paid IT Professional.
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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