Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-19-2003, 01:42 AM
|
#1
|
Member
Registered: Aug 2003
Posts: 81
Rep:
|
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
|
|
|
08-19-2003, 03:33 AM
|
#2
|
Member
Registered: Oct 2002
Distribution: MDK 9.2, Debian
Posts: 74
Rep:
|
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.
|
|
|
08-19-2003, 07:08 AM
|
#3
|
Member
Registered: Aug 2003
Posts: 81
Original Poster
Rep:
|
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!
|
|
|
08-19-2003, 07:41 AM
|
#4
|
Member
Registered: Aug 2003
Posts: 81
Original Poster
Rep:
|
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!
|
|
|
08-19-2003, 12:31 PM
|
#5
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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.
|
|
|
08-20-2003, 01:04 AM
|
#6
|
Member
Registered: Aug 2003
Posts: 81
Original Poster
Rep:
|
this is for redhat, it seems, but how is it for suse 8.0??? thx anyway...
|
|
|
08-20-2003, 05:45 PM
|
#7
|
Moderator
Registered: May 2001
Posts: 29,417
|
this is for redhat, it seems, but how is it for suse 8.0???
Dunno, maybe look at /etc/rc.config* ?
|
|
|
08-21-2003, 12:49 AM
|
#8
|
Member
Registered: Aug 2003
Posts: 81
Original Poster
Rep:
|
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!
|
|
|
All times are GMT -5. The time now is 07:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|