Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.