Skip to contentSkip to conversation

iptables-restore help

DISCUSSION ads nat 2 participants 4 messages Sep 28, 2003

lore
Share & tools
lore

ads nat

author
#0 lore raw

Hi,
I am learning to use iptables.
I have gone through FAQ and tutorials but have two problems :

1) I can create rules, delete rules, save rules with "iptables-save" command. But can not use "iptables-restore" properly. my iptables file is in at /etc/sysconfig/iptables I am using Redhat Linux 8.0, iptables 1.2.6a version.

Whatever rule I have saved goes off when i reboot system. As I have understood after using "iptables-restore" command, it should save rules in /etc/sysconfig/iptables file. So that when system reboots automatically it will be implimented.

2) I have set rule "iptables -A INPUT -i eth0 -m state --state NEW -m limit --limit 1 -j LOG" so that i can go through logs of NEW users tryong to connect to server. These are saved in which file? Help appreciated.

Thanks

---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

#1 lore raw

iptables doesn't inherently save state data. Redhat 8.0 might do something along those lines, but if you are really trying to play with the iptables rules, it is probably best to disable the redhat stuff and build your own startup / shutdown scripts so that you really know what is going on under the hood.

Quoted 19 lines · ads nat

Hi,
I am learning to use iptables.
I have gone through FAQ and tutorials but have two problems :

1) I can create rules, delete rules, save rules with "iptables-save" command. But can not use "iptables-restore" properly. my iptables file is in at /etc/sysconfig/iptables I am using Redhat Linux 8.0, iptables 1.2.6a version.

Whatever rule I have saved goes off when i reboot system. As I have understood after using "iptables-restore" command, it should save rules in /etc/sysconfig/iptables file. So that when system reboots automatically it will be implimented.

2) I have set rule "iptables -A INPUT -i eth0 -m state --state NEW -m limit --limit 1 -j LOG" so that i can go through logs of NEW users tryong to connect to server. These are saved in which file? Help appreciated.

Thanks

------------------------------------------------------------------------
Do you Yahoo!?
The New Yahoo! Shopping <http://shopping.yahoo.com/?__yltc=s%3A150000443%2Cd%3A22708228%2Cslk%3Atext%2Csec%3Amail>
- with improved product search

author
#2 lore raw

Please guide me how to do this otherwise.
Thanks.

Daniel Chemko <[email protected]> wrote:
iptables doesn't inherently save state data. Redhat 8.0 might do something along those lines, but if you are really trying to play with the iptables rules, it is probably best to disable the redhat stuff and build your own startup / shutdown scripts so that you really know what is going on under the hood.

ads nat wrote:
Hi,
I am learning to use iptables.
I have gone through FAQ and tutorials but have two problems :

1) I can create rules, delete rules, save rules with "iptables-save" command. But can not use "iptables-restore" properly. my iptables file is in at /etc/sysconfig/iptables I am using Redhat Linux 8.0, iptables 1.2.6a version.

Whatever rule I have saved goes off when i reboot system. As I have understood after using "iptables-restore" command, it should save rules in /etc/sysconfig/iptables file. So that when system reboots automatically it will be implimented.

2) I have set rule "iptables -A INPUT -i eth0 -m state --state NEW -m limit --limit 1 -j LOG" so that i can go through logs of NEW users tryong to connect to server. These are saved in which file? Help appreciated.

Thanks

---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

author
#3 lore raw

I got it.
command to save iptables rule to
/etc/sysconfig/iptables for Redhat 8.0 is
"/sbin/service iptables save"

Thanks

Quoted 41 lines · --- ads nat

Please guide me how to do this otherwise. Thanks.

Daniel Chemko <[email protected]> wrote:
iptables doesn't inherently save state data. Redhat 8.0 might do something along those lines, but if you are really trying to play with the iptables rules, it is probably best to disable the redhat stuff and build your own startup / shutdown scripts so that you really know what is going on under the hood.

ads nat wrote:
Hi,
I am learning to use iptables.
I have gone through FAQ and tutorials but have two problems :

1) I can create rules, delete rules, save rules with "iptables-save" command. But can not use "iptables-restore" properly. my iptables file is in at /etc/sysconfig/iptables
I am using Redhat Linux 8.0, iptables 1.2.6a version.

Whatever rule I have saved goes off when i reboot system. As I have understood after using "iptables-restore" command, it should save rules in /etc/sysconfig/iptables file. So that when system reboots automatically it will be implimented.

2) I have set rule "iptables -A INPUT -i eth0 -m state --state NEW -m limit --limit 1 -j LOG" so that i can go through logs of NEW users tryong to connect to server. These are saved in which file? Help appreciated.

Thanks

Quoted 8 lines

---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product

search

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com