PDA

View Full Version : not able to save iptable rules


ascheucher
2005-06-28, 01:47 AM CDT
I've got a strange problem. I defined some time ago some iptable rules and wrote them into a script. When I execute it, the the firewall is configured properly (like it should be).
I save now the configuration int a file for comparsion: iptables -L > before_boot.txt
After that, I save the configuratione: service iptables save
It says [OK]
after reboot I save my configuration again to compare it: iptables -L > after_reboot.txt

Big surprise: there are some rules missing.

Waht do I wrong in saving the rules? The /etc/sysconfig/iptables file is there and writeable:
-rw------- 1 root root 1514 28. Jun 08:25 /etc/sysconfig/iptables

Im really sad now to call the script after every boot manually....

Anybody any idea?
thanks a lot,
Andreas

Jman
2005-06-28, 06:18 PM CDT
Try using iptables-save and iptables-restore

ascheucher
2005-06-29, 02:35 AM CDT
thanks, the problem is solved. it seems, I have changed the iptables script long time ago and the loading of the configuration at boottime did not work. de- and reinstalling the iptables package fixed the prolem.