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

Notices


Reply
  Search this Thread
Old 04-07-2007, 11:48 AM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
where to insert firewall rules?


Hi,
using the old style -following a tutorial- i inserted them in /var/lib/iptables/active and also using the /etc/init.d/iptables script. Where are they supposed to be placed (in releases >= Etch)?

Thanks
 
Old 04-10-2007, 09:01 PM   #2
richinsc
Member
 
Registered: Mar 2007
Location: Utah
Distribution: Ubuntu Linux (20.04)
Posts: 224

Rep: Reputation: 32
I insert my iptables script in /etc/network/if-up/.. You just have to make sure that you put a number in front of file name. I name mine 00-firewall. This makes it so that as soon as Ethernet interfaces come up the firewall goes active rather then waiting for everything else to load.

This path is specific to Debian for me.. Don't know about other distros.
 
Old 04-11-2007, 02:28 AM   #3
oldlucky
LQ Newbie
 
Registered: Jul 2006
Location: Australia
Distribution: Debian Etch
Posts: 15

Rep: Reputation: 0
Quote:
Originally Posted by nocturna_gr
Hi,
using the old style -following a tutorial- i inserted them in /var/lib/iptables/active and also using the /etc/init.d/iptables script. Where are they supposed to be placed (in releases >= Etch)?

Thanks

1. First create your firewall script then put it in the /etc/init.d folder (i name mine firewall-script.sh)

2. Then make it executable by typing the following in a terminal as root

chmod +x /etc/init.d/firewall-script.sh

then change directory

cd /etc/rcS.d/

3.Then create a smlink

ln -s /etc/init.d/firewall-script.sh S99-firewall-script.sh

Thats it, should work now when you start your computer.

cheers
 
  


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
/etc/audit.rules - Error sending watch insert request Linux_Learner[LL] Linux - Security 2 07-16-2006 07:19 AM
Firewall Rules studpenguin Linux - Security 0 07-01-2004 03:14 AM
help with firewall rules please deuce868 Linux - Security 1 06-14-2004 03:18 PM
How do you insert an iptables rules before the end?.... steppin_razor Linux - Security 2 11-25-2001 06:39 PM
How do you insert an iptables rules before the end?.... steppin_razor Linux - Networking 0 11-20-2001 11:23 PM

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

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