LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 07-09-2005, 12:12 AM   #1
gizza23
Member
 
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188

Rep: Reputation: 31
iptables resets


Hello,
I have questions concerning iptables. I have time and time again tried to configure and save the changes that I have made to iptables. Although i havebeen through this many times, these new reconfigurations never save. I do notice that a new chain named RH-Firewall01-INPUT has appeared as an alias. But for what chains is my question. Take linuxquestions.org example on iptables. I have used these two entries before:

Code:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
And...

Code:
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
I've saved using iptables-save, yet after a restart I get this:

Code:
[root@mun-175-161 ~]# iptables --list
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere
ACCEPT     ipv6-auth--  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:telnet
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
[root@mun-175-161 ~]#
Please avise.
 
Old 07-09-2005, 12:19 AM   #2
mhallbiai
Member
 
Registered: Jun 2005
Posts: 96

Rep: Reputation: 15
Code:
service iptables save
this will save the iptables with all current rules (the ones you added) to /etc/sysconfig/iptables

iptables-save without any option prints to stdout, you can redirect it to a file (iptables-save > /tmp/saved-iptables-to-file)

as far as the RH-Firewall-1-INPUT chain created, anything on INPUT or FORWARD is jumped to the RH-Firewall-1-INPUT chain . its an easy way to apply the same rules to more than one chain (in this case input/forward)


hope this helps

[EDIT:corrected RH-Firewall-1-INPUT references]

Last edited by mhallbiai; 07-09-2005 at 12:25 AM.
 
Old 07-09-2005, 11:25 AM   #3
gizza23
Member
 
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188

Original Poster
Rep: Reputation: 31
Thumbs up Bingo!

That was just the command that I needed mhallbiai! I appreciate the time you took to answer my questions. Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Resolution resets after reboot mouldy_punk Suse/Novell 0 01-26-2005 11:49 AM
Permissions resets Wolf_Assassin Linux - Security 4 10-22-2004 03:31 AM
sysctl.conf resets itself? JohnLocke Linux - Newbie 1 07-14-2004 11:24 PM
Can't login as a user... x resets TippExed Debian 1 08-22-2003 01:16 PM
Time resets magically.... itsjustme Linux - General 2 04-27-2003 10:10 PM


All times are GMT -5. The time now is 04: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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration