general-6in () {
	#Allow localhost
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i lo -j ACCEPT

	## Allow established connection
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -m state --state ESTABLISHED,RELATED -j ACCEPT

	# Allow pings
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p ipv6-icmp -j ACCEPT

	# Allow incoming to servers
	### open IPv6  http
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 80 -j ACCEPT
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 443 -j ACCEPT
	### open IPv6  ssh
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 22 -j ACCEPT
	### open IPv6  smtp
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 25 -j ACCEPT
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 465 -j ACCEPT
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 587 -j ACCEPT
	### open IPv6 ftp
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 21 -j ACCEPT
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 20 -j ACCEPT
	### open IPv6 dns
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 53 -j ACCEPT
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p udp --destination-port 53 -j ACCEPT
	### open IPv6 pop
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 110 -j ACCEPT
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 995 -j ACCEPT
	### open IPv6 imap
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 143 -j ACCEPT
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 993 -j ACCEPT
	### open IPv6 sieve
	#${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -i ${INTERFACE} -p tcp --destination-port 2000 -j ACCEPT

	## Log incoming traffic
	${IP6TABLES} -A ${GENERAL_IP6_IN_CHAIN} -m limit --limit 5/min -j LOG --log-prefix '** Incoming v6 **' --log-level 7

	## Drop incomming traffic
	${IP6TABLES} -P INPUT DROP
}

general-6out () {
	# Allow localhost
	${IP6TABLES} -A ${GENERAL_IP6_OUT_CHAIN} -o lo -j ACCEPT

	# Allow all except invalid state
	${IP6TABLES} -A ${GENERAL_IP6_OUT_CHAIN} -o ${INTERFACE} -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

	# Drop outgoing traffic
	${IP6TABLES} -P OUTPUT DROP
}

general-6for () {
	## Log forward traffic
	${IP6TABLES} -A ${GENERAL_IP6_FOR_CHAIN} -m limit --limit 5/min -j LOG --log-prefix '** Forward v6 **' --log-level 7

	## Drop forward traffic
	${IP6TABLES} -P FORWARD DROP
}
