Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 750 Bytes

README.md

File metadata and controls

30 lines (23 loc) · 750 Bytes

iptables.sh

curl --url https://raw.githubusercontent.com/panpansh/iptables.sh/master/firewall --output /etc/init.d/firewall
curl --url https://raw.githubusercontent.com/panpansh/iptables.sh/master/firewall-noip --output /etc/init.d/firewall-noip
chmod +x /etc/init.d/firewall
chmod +x /etc/init.d/firewall-noip

Edit /etc/init.d/firewall and /etc/init.d/firewall-noip to match your needs

/etc/init.d/firewall
# check rules
/sbin/iptables -L

When you are satisfied with the rules add them to sysvinit

/sbin/update-rc.d firewall defaults

Add /etc/init.d/firewall-noip to crontab

*/20 * * * * /etc/init.d/firewall-noip

in this case the script run every 20 minutes

You are welcome to make changes.