LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-13-2006, 05:05 PM   #1
Madone_SL_5.5
Member
 
Registered: Oct 2006
Location: Ogden, Utah
Distribution: Fedora 10
Posts: 66

Rep: Reputation: 15
Rules return after delete and iptables-save


I run a website server on Fedora Core 6. I am reworking my iptables configuration to tighten up my security. I basically just want to flush all my rules and redo the whole thing.

So I flushed my iptables configuration with iptables -F and then appended a new set of rules. I then used iptables-save and restarted iptables to see what would happen, and all my old rules came back.

I'm missing something here, aren't I?

Any suggestions?

Last edited by Madone_SL_5.5; 12-13-2006 at 05:24 PM.
 
Old 12-13-2006, 05:24 PM   #2
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Rep: Reputation: Disabled
Perhaps give us more detail, for example:

1. System boots
2. iptables -F
3. iptables -A ...
4. iptables-save
5. Reboot

Not sure what to expect at this point. Also include output from `which iptables-save` please.
 
Old 12-13-2006, 05:30 PM   #3
Madone_SL_5.5
Member
 
Registered: Oct 2006
Location: Ogden, Utah
Distribution: Fedora 10
Posts: 66

Original Poster
Rep: Reputation: 15
I perform the following steps:

1. System running
2. iptables -F
3. iptables -A INPUT -j ACCEPT
4. iptables -A FORWARD -j REJECT
5. iptables -A OUTPUT -j ACCEPT
6. iptables-save
7. /etc/init.d/iptables restart

Which iptables-save results in /sbin/iptables-save

Regardless of whether I add or delete rules, I always end up with the same rules as before.

Last edited by Madone_SL_5.5; 12-13-2006 at 05:31 PM.
 
Old 12-13-2006, 05:35 PM   #4
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Rep: Reputation: Disabled
Can you post the output of `iptables -nvL` before and after that process?
 
Old 12-13-2006, 05:44 PM   #5
Madone_SL_5.5
Member
 
Registered: Oct 2006
Location: Ogden, Utah
Distribution: Fedora 10
Posts: 66

Original Poster
Rep: Reputation: 15
iptables -nvL

iptables -nvL shows after the process, when all the rules have come back. It is the same as before:

Quote:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
157 13422 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
5 240 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.100 tcp dpt:22
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.100 tcp dpt:25
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.0.100 tcp dpt:80
0 0 ACCEPT all -- * * 127.0.0.1 192.168.0.100
0 0 ACCEPT icmp -- * * 0.0.0.0/0 192.168.0.100
0 0 REJECT all -- * * 0.0.0.0/0 192.168.0.100 reject-with icmp-port-unreachable
30 3927 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- eth0 * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
119 13796 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state NEW,RELATED,ESTABLISHED
 
Old 12-15-2006, 11:30 AM   #6
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Rep: Reputation: Disabled
Please post your full process and wrap the segments in CODE tags so the formatting is maintained. Additionally, please cat your /etc/init.d/iptables script and post that as well (in CODE tags).
 
  


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
Which folder in linux can be safetly delete to save disk space. TruongAn Linux - General 8 12-19-2005 03:09 PM
File Permissions/ Can't save or delete website files friendlyflier Linux - Security 4 08-07-2005 07:32 AM
evolution return to inbox after email delete rocksniffer Linux - Software 0 05-20-2005 04:31 PM
save space and delete old packages ctagg Linux - Newbie 1 03-14-2005 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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