[NTLUG:Discuss] Iptables config file... where?
m m
llliiilll at hotmail.com
Tue Feb 11 20:33:55 CST 2003
I think the original post is looking for the rules.
3 ways,
1. at command line you append the rule one by one.
example:
#iptables -A FORWARD -p tcp --sport 635 -j DROP
#iptables -A FORWARD -p udp --sport 635 -j DROP
...
2. write a 'rules' file and have iptables read and append it.
example:
write a script file and run it.
a file iptables.rule contains:
#iptables -A FORWARD -p tcp --sport 635 -j DROP
#iptables -A FORWARD -p udp --sport 635 -j DROP
at command lime, you do:
# iptables.rule
3. write a 'rules' file and have iptables read it.
example:
write a script file and use iptable-restore.
a file iptables.rule contains:
-A FORWARD -p tcp --sport 635 -j DROP
-A FORWARD -p udp --sport 635 -j DROP
at command line, you do:
# iptables-restore -f < iptables.rule
hope this helps.
>From: Kenneth Loafman <ken at lt.com>
>Reply-To: NTLUG Discussion List <discuss at ntlug.org>
>To: NTLUG Discussion List <discuss at ntlug.org>
>Subject: Re: [NTLUG:Discuss] Iptables config file... where?
>Date: Fri, 24 Jan 2003 14:59:41 -0600
>
>MadHat wrote:
>>On Fri, 2003-01-24 at 09:43, Kenneth Loafman wrote:
>>
>>>This is a really stupid question... where does iptables hide the firewal
>>>config file/script? I can run 'iptables -L' and things are configured,
>>>possibly defaults, but I need to make some additions, and I can't seem to
>>>find the config file. Even the man page does not even have a FILES
>>>section, so why/where are they hiding it?
>>>
>>>This one is on a Debian system.
>>>
>>
>>
>>
>>dpkg -p iptables
>>
>>/etc/default/iptables
>>
>>
>
>Been through all of the above,
>'locate iptables' returns the usual suspects,
>grep'ed /etc/init.d for iptables use, none,
>grep'ed /etc recursively for iptables use, none,
>grep'ed /var recursively for iptables use, none.
>
>Its a mystery where the config comes from. I noticed that a couple of
>ports unique to us are in the FORWARD table, so these are not default
>settings. They survive after boot, on a custom kernel I geened a few
>months ago, so they have to be saved somewhere outside the kernel.
>
>I just can't find where.
>
>...Ken
>
>
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the Discuss
mailing list