You are not logged in.

#1 2005-12-08 23:53:03

The Vaxorcist
Member
Registered: 2005-12-08
Posts: 18

Where do I put it?

I want to copy my script for setting up my firewall with iptables to my arch system, except, where do I put it? I was looking around, and I figure I should create my own initscript, call it iptables, and have it do its stuff in there. What do you think?
Is there a better or more elegant solution?

I'm new here, so, hello.

Offline

#2 2005-12-09 00:10:20

saintshakajin
Member
Registered: 2005-04-13
Posts: 32

Re: Where do I put it?

Personally, I've done a script with iptables and put a line in /etc/rc.local to execute it.
You can do an initscript too if you want but it takes more time to do it.

Offline

#3 2005-12-09 00:16:55

The Vaxorcist
Member
Registered: 2005-12-08
Posts: 18

Re: Where do I put it?

Yeah, I could do that, but I don't mind doing the extra work if the result is more elegant. I was also trying to avoid doing just what you did.

Offline

#4 2005-12-09 00:29:20

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

Re: Where do I put it?

pacman -Sy iptables

write your firewall config script. run it.
check your rules.
then. /etc/rc.d/iptables save
the table definitions are saved in the /etc/iptables folder by the way.

put iptables in your DAEMONS array, right before network, and you are golden.

on startup, iptables "daemon" simply loads the saved tables definition..


"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-12-09 22:19:10

The Vaxorcist
Member
Registered: 2005-12-08
Posts: 18

Re: Where do I put it?

Thanks, I did that, but I modified the initscript so it runs my own script instead of just loading the saved rules. Just saving the rules would work, except I already have a script that sets it up, and that script has about ten of echo 1 > /proc/foo/bar/bas

Offline

#6 2005-12-09 22:29:35

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

Re: Where do I put it?

mine does too, but I use the sysctl.conf file to set those subsequently.
/me shrugs
one less thing to do on my own, and since sysctl gets run anyway...

a place for everything, and everything in its place.


"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

Board footer

Powered by FluxBB