LinuxQuestions.org
Help answer threads with 0 replies.
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 10-26-2005, 01:55 AM   #1
kingcomein
LQ Newbie
 
Registered: Oct 2005
Posts: 18

Rep: Reputation: 0
Debian iptables


When i type "iptables -L" under command line that login as root.
It displayed below messages:

Note: /etc/modules.conf is more recent than /lib/modules/2.2.20-idepci/modules.dep
modprobe: Can't locate module ip_tables iptables v1.2.11: can't initialize iptables table 'filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.


What should I do?

thx....
 
Old 10-26-2005, 04:11 AM   #2
kingcomein
LQ Newbie
 
Registered: Oct 2005
Posts: 18

Original Poster
Rep: Reputation: 0
I solve the above problem by updated the kernel.

But i have any other problem, how to save the change after i set the iptables?

I used the command:

"iptables-save -c" <---- but cannot work after i reboot the debian once.

"/etc/init.d/iptables save active" <----- it displayed "Bad argument 'save'"

have anyone know how can i do ?
 
Old 10-26-2005, 06:24 AM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I think it is actually better *not* to store the iptables settings.

It is much better to write a script which starts with flushing all chains, and then establish new rules.

If you do, it is MUCH easier to change things. Just edit the script and run it again. If you do save and restore, it is virtually impossible to change something. Unless you have a perfect memory so you can remember exactly what the status of iptables is at any moment that you perform a change.

There are many examples of iptables scripts available on the net. Also refer to this tutorial. It contains an excellent explanation of iptables, and a number of example scripts at the end.

Debian also comes with the ipmasq package. When you install ipmasq, it automatically generates a script which is makes your machine a masquerading firewall. This is very useful, I used it as the base for writing my own, highly tailored firewall script.

If you use a script, do not forget to start with flushing all chains, deleting all custom tables and setting the correct policy. If you forget to null out one rule, you can be looking for days why certain traffic never complets. I know from experience.

jlinkels
 
Old 10-26-2005, 07:35 AM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
To continue from the networking forum thread (now closed) the first initiation of the script is at runlevel 2 and most of the other servers start after this so there should be adequate coverage during the period.
 
Old 10-31-2005, 10:17 PM   #5
deception
LQ Newbie
 
Registered: Oct 2005
Location: NL
Distribution: Debian,Suse
Posts: 17

Rep: Reputation: 0
Quote:
Originally posted by TigerOC
To continue from the networking forum thread (now closed) the first initiation of the script is at runlevel 2 and most of the other servers start after this so there should be adequate coverage during the period.
Why not get it up before the net devices?
Before ifup, like pre-up or something?

Grtz Decep.
 
  


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
Debian iptables kingcomein Linux - Networking 6 10-26-2005 06:20 AM
iptables on Debian ujotne Linux - Security 4 09-16-2005 07:36 PM
Debian - IPTABLES czezz Linux - Security 6 06-20-2005 05:07 AM
IPtables - Debian set up fredg Linux - Security 4 05-26-2005 05:04 PM
debian and iptables? banana2 Linux - Security 5 01-12-2003 09:35 AM

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

All times are GMT -5. The time now is 05:51 PM.

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