I’m totally new to Linux, decided to try and learn it so I got a Linode 512 with Linux Debian 6 to learn on.
Learning about iptables I found the below on Google:
First make iptables rules and made sure they work.
Second is to save those rules to a configuration file
Code:
iptables-save > /root/scripts/iptables.save
Save custom scripts and required files in the /root/scripts/ folder.
Google showed me how to make the scripts folder.
Third make a script that loads the iptables rules at reboot
Code:
echo "#!/bin/bash" > /etc/network/if-up.d/iptables
echo "iptables-restore < /root/scripts/iptables.save > >> /etc/network/if-up.d/iptables
chmod +x /etc/network/if-up.d/iptables
Now I have done one and two but don’t know how to do step three.
I got a program called programmers note pad but what do I save the file as, and is “/etc/network” the correct path/location for Linode?
Thanks
Sarah