You are not logged in.

#1 2005-03-14 21:00:46

deft
Member
Registered: 2005-03-14
Posts: 79

IPtables script run on boot-up

Hi - at present I manually run my iptables script by su to root, cd into script directory then ./<scriptname> - this works fine and I then check it with:

# iptables -L -v

No problems - now - is there a standard way with Arch for your iptables script to be run automatically on boot ?

Thanks.

Offline

#2 2005-03-14 21:12:09

sorcerer
Member
Registered: 2005-02-25
Posts: 18

Re: IPtables script run on boot-up

sure, just add "iptables" to the DAEMONS line in /etc/rc.conf
(it will restore /etc/iptables/iptables.rules on boot, and save it on shutdown)

Offline

#3 2005-03-14 21:17:39

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: IPtables script run on boot-up

First, run your iptables script and then execute 'iptables-save > /etc/iptables/iptables.rules' to save your rules. Then add iptables to DAEMONS array to have those rules executed on boot, as sorcerer suggested.

Offline

#4 2005-03-14 21:27:19

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: IPtables script run on boot-up

lucke wrote:

First, run your iptables script and then execute 'iptables-save > /etc/iptables/iptables.rules' to save your rules. Then add iptables to DAEMONS array to have those rules executed on boot, as sorcerer suggested.

/etc/rc.d/iptables start
*run iptables script*
/etc/rc.d/iptabes save


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2005-03-14 21:30:19

deft
Member
Registered: 2005-03-14
Posts: 79

Re: IPtables script run on boot-up

Cheers guys - I've sorted it - ran the script then checked it was active with:

# iptables -L

then saved the active ruleset with:

# /etc/rc.d/iptables save

then added:

iptables

to the daemons list in /etc/rc.conf

rebooted - and checked it's active, and it is wink

Thanks again everyone smile

Offline

Board footer

Powered by FluxBB