Iptables not sticking after reboot? Try this
(1 post)
(1 voice)
-
Had a bit of a problem where the iptables pre-up entry was being overwritten by an autogenerated /etc/network/interfaces file in both Ubuntu 10.04 and Debian 6. So on reboot, running
iptables -Lwould show nothing.
If you run into the same issue, try this for the pre-up rules instead:
Create/edit pre-up script file for iptables:
nano /etc/network/if-pre-up.d/iptablesAdd this:
#!/bin/sh
iptables-restore < /etc/iptables.up.rulesSave and close...and make it executable:
chmod +x /etc/network/if-pre-up.d/iptablesPosted 9 months ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
