#!/bin/sh

# firewall
[ -e /etc/config/firewall ] || exit 1
[ -e /octo/etc/iptables.restore ] || exit 1

cat <<EOF > /etc/config/firewall
config defaults
	option syn_flood	'1'
	option input		'ACCEPT'
	option output		'ACCEPT'
	option forward		'REJECT'
	# Uncomment this line to disable ipv6 rules
	#option disable_ipv6	'1'

# include a file with users custom iptables rules
config include
	option path	'/octo/etc/iptables.restore'

EOF

exit 0
