LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-19-2003, 01:42 AM   #1
mule
Member
 
Registered: Aug 2003
Posts: 81

Rep: Reputation: 15
iptables - loosing entries after reboot


Hello all,

i have an old machine running suse 8.0 on it. now, i inserted some rows in the nat table - prerouting. with iptables -A -t nat ....and so on....

everything works, if i do iptables -t nat -L i see my entry. But if i reboot it's no longer there! so, what do you think did i miss?

thx
Roger
 
Old 08-19-2003, 03:33 AM   #2
Read_Icculus
Member
 
Registered: Oct 2002
Distribution: MDK 9.2, Debian
Posts: 74

Rep: Reputation: 16
Are you using a script to store your iptables entries? Or are you using iptables-save and iptables-restore? iptables will lose all rules and chains when the system reboots unless they are saved in a script or with iptables-save. If your distro already has a firewall script you should be able to add your iptables rules to it and everything should work.
 
Old 08-19-2003, 07:08 AM   #3
mule
Member
 
Registered: Aug 2003
Posts: 81

Original Poster
Rep: Reputation: 15
i tried it with iptables-save but didn't help i think i figured out a script in /etc/sysconfig....i will have a look on this...thx!
 
Old 08-19-2003, 07:41 AM   #4
mule
Member
 
Registered: Aug 2003
Posts: 81

Original Poster
Rep: Reputation: 15
to not too much fiddling around, i wrote a short shell-script and inserted iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 in it. this shell-script will be loaded from runlevel 3 on. i think this will work too, if it gets startet AFTER the firewall-script itself!
 
Old 08-19-2003, 12:31 PM   #5
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
If you want to save your iptables rules, login as root and type:
Code:
service iptables save
This will save your rules in the /etc/sysconfig/iptables file.
 
Old 08-20-2003, 01:04 AM   #6
mule
Member
 
Registered: Aug 2003
Posts: 81

Original Poster
Rep: Reputation: 15
this is for redhat, it seems, but how is it for suse 8.0??? thx anyway...
 
Old 08-20-2003, 05:45 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
this is for redhat, it seems, but how is it for suse 8.0???
Dunno, maybe look at /etc/rc.config* ?
 
Old 08-21-2003, 12:49 AM   #8
mule
Member
 
Registered: Aug 2003
Posts: 81

Original Poster
Rep: Reputation: 15
Suse has its own scripts in /etc/sysconfig/SuSEfirewall2 ...so nevermind, i wrote a shell-scripts that will be loaded at startup....function is there!
 
  


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
iptables; ACK/SYN/etc; understand the bits, and potential firewall entries TheLinuxDuck Linux - Security 2 10-18-2011 09:17 PM
iptables not surviving reboot BurceB7 Linux - Security 9 03-29-2004 10:32 AM
No entries in iptables? PenguinPwrdBox Linux - Networking 9 02-18-2004 06:58 PM
Fstab entries vanish after reboot zoropio Fedora 1 02-01-2004 06:48 AM
Loosing hardware settings on reboot..? ScreeminChikin Linux - General 1 09-09-2002 03:46 PM

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

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