LinuxQuestions.org
Review your favorite Linux distribution.
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 09-25-2008, 06:25 AM   #1
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Rep: Reputation: 15
iptables -F > iptables_rules.txt


I'm using Firehol on Ubuntu Hardy. I was going to dump the iptables rules into a text file. However, by mistake I did this

Code:
iptables -F > iptables_rules.txt
instead of this:

Code:
iptables -L > iptables_rules.txt
i had to reboot my firewall, because that seemed to have knocked out my internet.

I now did the correct iptables -L and everything is set to ACCEPT and destination anywhere.

Have I lost my iptables rules?? What can I do?
 
Old 09-25-2008, 08:24 AM   #2
DaExecuter
LQ Newbie
 
Registered: Sep 2008
Location: India
Distribution: RHEL4, Fedora 8/9, Debian, OpenSuse, FreeBSD, Slackware
Posts: 8

Rep: Reputation: 0
No, you have not. iptables -F release iptables/firewall hooks only at run time. Ur iptables rules are generally saved in /etc/sysconfig/iptables

so, just check ur chkconfig --list iptables
and the file I mentioned








Quote:
Originally Posted by rozilla View Post
I'm using Firehol on Ubuntu Hardy. I was going to dump the iptables rules into a text file. However, by mistake I did this

Code:
iptables -F > iptables_rules.txt
instead of this:

Code:
iptables -L > iptables_rules.txt
i had to reboot my firewall, because that seemed to have knocked out my internet.

I now did the correct iptables -L and everything is set to ACCEPT and destination anywhere.

Have I lost my iptables rules?? What can I do?
 
Old 09-27-2008, 01:49 PM   #3
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by DaExecuter View Post
No, you have not. iptables -F release iptables/firewall hooks only at run time. Ur iptables rules are generally saved in /etc/sysconfig/iptables

so, just check ur chkconfig --list iptables
and the file I mentioned
I don't have a sysconfig dir on my firewall. What's the Ubuntu equivalent?
 
  


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
how to md5 a txt graziano1968 Linux - General 4 02-21-2007 04:36 AM
How can read from file.txt C++ where can save this file(file.txt) to start reading sam_22 Programming 1 01-11-2007 05:11 PM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
robots.txt paleogryph Linux - Software 1 11-11-2005 02:32 PM
txt >> mysql LLS Programming 2 06-21-2005 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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