LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2004, 08:15 PM   #1
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Rep: Reputation: 15
restoring iptables-restore


i saved my iptables settings using /sbin/service iptables save.. and now i have a 'failed' come up on boot up in regards to iptables..

my internet works fine as i have my ipforwarding and firewall stuff saved in another start up file.. but i would like to get rid of the settings in iptables-restore.. just to make sure it won't screw things up later..

also how do you update your search file database.. as i've added a number of new files and i'd like to be able to find them when i search for them.. i know there's a thread about this somewhere.. but i couldn't find it..

thanks..
 
Old 01-22-2004, 03:18 AM   #2
pedro_nf
Member
 
Registered: Sep 2003
Location: France
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
Re: restoring iptables-restore

Quote:
Originally posted by Zaius
i saved my iptables settings using /sbin/service iptables save.. and now i have a 'failed' come up on boot up in regards to iptables..
my internet works fine as i have my ipforwarding and firewall stuff saved in another start up file.. but i would like to get rid of the settings in iptables-restore.. just to make sure it won't screw things up later..
the service in /etc/init.d/iptables looks for the file /etc/sysconfig/iptables
this file is a iptables-save file, you can create it and replace it at will.
if this file doesn't exist then the service will not start. This way you can start your own service that loads your rules from another script file.


Quote:
Originally posted by Zaius
also how do you update your search file database.. as i've added a number of new files and i'd like to be able to find them when i search for them.. i know there's a thread about this somewhere.. but i couldn't find it..
updatedb will update the files locate database...
when you work at night and sudenly you start to ear your hard disk spinning like crazy, if you look for the running processes with 'top' you'll see updatedb at the top!
 
Old 01-22-2004, 09:29 AM   #3
slapshotct
LQ Newbie
 
Registered: Jan 2004
Location: CT
Distribution: Servers: Debian, RH8, Laptop: Fedora
Posts: 15

Rep: Reputation: 0
Re: Re: restoring iptables-restore

Quote:
Originally posted by pedro_nf
the service in /etc/init.d/iptables looks for the file /etc/sysconfig/iptables
this file is a iptables-save file, you can create it and replace it at will.
if this file doesn't exist then the service will not start. This way you can start your own service that loads your rules from another script file.
To keep the script from running (so you don't get the failed message) you can always remove the executable permission on the iptables script in /etc/init.d

ex - chmod 644 /etc/init.d/iptables
 
Old 01-22-2004, 09:48 AM   #4
pedro_nf
Member
 
Registered: Sep 2003
Location: France
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
Re: Re: Re: restoring iptables-restore

Quote:
Originally posted by slapshotct
To keep the script from running (so you don't get the failed message) you can always remove the executable permission on the iptables script in /etc/init.d

ex - chmod 644 /etc/init.d/iptables
... well, thats can lead to problems later, when you want it to run and don't remmember to change its permissions...
I'd prefer to delete the file /etc/sysconfig/iptables, if this data file doesn't exist the service /etc/init.d/iptables doesn't start. You can check this by looking at the /etc/init.d/iptables script, at the top it checks for the /etc/sysconfig/iptables file.
 
Old 01-22-2004, 10:34 AM   #5
slapshotct
LQ Newbie
 
Registered: Jan 2004
Location: CT
Distribution: Servers: Debian, RH8, Laptop: Fedora
Posts: 15

Rep: Reputation: 0
Re: Re: Re: Re: restoring iptables-restore

Quote:
Originally posted by pedro_nf
... well, thats can lead to problems later, when you want it to run and don't remmember to change its permissions...
I'd prefer to delete the file /etc/sysconfig/iptables, if this data file doesn't exist the service /etc/init.d/iptables doesn't start. You can check this by looking at the /etc/init.d/iptables script, at the top it checks for the /etc/sysconfig/iptables file.
That is definitely something to consider for a newbie. For me, I run Linux on my laptop and am constantly 'showing off' Linux to Windows clients and collegues. The last thing I would want them to see is a [FAILED] message.
 
Old 01-22-2004, 10:40 AM   #6
pedro_nf
Member
 
Registered: Sep 2003
Location: France
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
Re: Re: Re: Re: Re: restoring iptables-restore

Quote:
Originally posted by slapshotct
That is definitely something to consider for a newbie. For me, I run Linux on my laptop and am constantly 'showing off' Linux to Windows clients and collegues. The last thing I would want them to see is a [FAILED] message.
yep, we all must do good publicity of linux!
 
Old 01-22-2004, 11:03 AM   #7
Zaius
Member
 
Registered: Jan 2004
Location: Canada
Posts: 68

Original Poster
Rep: Reputation: 15
sweet. thanks a lot.. the updatedb ran at some point as it finds all the new things i installed... but it's good to know how to it when i want to..

i mv the iptables.save file.. and i will see if the error comes up next time i reboot.. if the fail message comes up again. i will try you other solutions..

thanks
 
Old 01-22-2004, 11:55 AM   #8
pedro_nf
Member
 
Registered: Sep 2003
Location: France
Distribution: RedHat
Posts: 58

Rep: Reputation: 15
Quote:
Originally posted by Zaius
sweet. thanks a lot.. the updatedb ran at some point as it finds all the new things i installed... but it's good to know how to it when i want to..
If you have a big disk the updatedb can take long time. The best is to run it often via cron in the periods you are not using your PC (at noon, at night...)

Quote:
Originally posted by Zaius
i mv the iptables.save file.. and i will see if the error comes up next time i reboot.. if the fail message comes up again. i will try you other solutions..
thanks [/B]
Normaly if you don't have /etc/sysconfig/iptables you don't have any message at all from the /etc/init.d/iptables service. My current gateway to the internet (at home) is a linux RH and I disabled the default firewall service this way, I already had an older scripts with all my stuff inside.
Greets
Pedro
 
  


Reply



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
Restoring Grub Sevoma SUSE / openSUSE 6 12-31-2004 10:52 PM
Restoring to defaults Superganja23 Red Hat 7 11-14-2004 02:23 PM
iptables-restore fails with quite ordinary (i think) configuration Prommy Linux - General 5 02-17-2004 06:37 AM
Need help restoring XFree86 clinton Linux - Newbie 3 11-28-2003 09:30 PM
iptables-restore error on COMMIT budzynm Linux - Security 1 08-01-2003 03:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:29 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
Open Source Consulting | Domain Registration