I am setting up iptables on a new instance of Ubuntu 14.04 server.
So far I have:
- put iptables rules into a file
/etc/iptables.firewall.rules
- created a script
/etc/network/if-pre-up.d/iptablesload.sh
and put the following code in it
#!/bin/sh
iptables-restore < /etc/iptables.firewall.rules
exit 0
The firewall rules work, e.g. if I manualy run the command from a prompt
$ iptables-restore < /etc/iptables.firewall.rules
the iptables rules get applied. But when I reboot the server the firewall is not up - how can I fix this?
/sbin/iptables-restore