LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 11-04-2003, 08:13 PM   #1
LUXX
LQ Newbie
 
Registered: Oct 2003
Distribution: ArchLinux
Posts: 4

Rep: Reputation: 0
iptables to run at boot


Hi, I got arch installed and its great. I now want to get on the net so i found myself a iptables script and just need to know how to go about getting it to run at boot time. I have read up on on the way arch boots but am only new to linux so Im not quite sure how to get the script to run. Anyway awesome distro nice and fast. Thankyou.
 
Old 11-05-2003, 12:48 AM   #2
Bluesuperman
Member
 
Registered: Nov 2002
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
Not sure -- I use slackware -- in your /etc/rc.d directory

there either is a rc.local file, you could create a file called rc.firewall that is exe and that should get run on startup. If you have a init.d directory -- just place the exec file in there.
 
Old 11-05-2003, 06:14 AM   #3
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
You put the file in /etc/init.d. Then I'm not sure about arch but in Debian you symlink in to a directory /etc/rc.x where x is the number of the runlevel you wich to activate it in.
 
Old 11-05-2003, 08:43 PM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
You need to figure out which scripts are run at bootup. Look in /etc/inittab for the System initialization script. This is how RedHat or Mandrake would look.

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

This means that the next file to execute is /etc/rc.d/rc.sysinit. You can read through that file to find the next file which executes, for RH & MD it is /etc/rc.d/rc.local. Usually you will modify the rc.local file and leave the rc.sysinit file alone. ArchLinux may be similar or totally different but the inittab file will always tell you which file to start with.
 
Old 11-06-2003, 12:39 PM   #5
Mork
Member
 
Registered: Mar 2003
Location: Visby, Sweden
Distribution: Ubuntu 4.10
Posts: 64

Rep: Reputation: 15
The Arch way of doing this is as follows:
1. Place your script in /etc/rc.d/
2. Chown it to root and chmod 744
3. Add the name of the script in the DAEMONS array in /etc/rc.conf. Mine looks like this:
Code:
DAEMONS=(!pcmcia firewall network archstats)
4. Reboot or start the script by running /etc/rc.d/firewall start (replace firewall with the name of your script if needed).
5. If anything goes wrong, please ask again.bbs.archlinux.org is good for arch-specifik things.

Last edited by Mork; 11-06-2003 at 12:40 PM.
 
Old 11-07-2003, 10:48 PM   #6
LUXX
LQ Newbie
 
Registered: Oct 2003
Distribution: ArchLinux
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up thanks

Thanks everyone for the help. I ended up doing it as Mork said as its the arch way of doing things. Thanks.
 
  


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
have to run iptables -F ?? spudler Linux - Networking 1 02-13-2005 10:07 AM
Priority: script to run on boot vs. "service iptables save" iheardrain Linux - General 5 09-30-2004 09:53 PM
RH8 - how to automatically run iptables rules shell script at boot time nu-B Linux - General 1 10-29-2003 08:38 PM
can't run iptables. What's going on?? woranl Linux - Networking 14 08-21-2003 06:49 PM
iptables doesn't run correctly abd_bela Linux - Security 2 08-02-2003 11:20 AM

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

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