#!/bin/sh # network : ipv6/mask || dns6/mask local network="::/0" # clients : PROTO ; PORT ; UID/GID ; UID/GID ; UID/GID .... | # servers : PROTO ; PORT ; UID/GID ; UID/GID ; UID/GID .... | # forward : PROTO ; PORT | # [ WEB / WHOIS ] #local clients="$clients|TCP ;http ;root/root;www-data/www-data" #local clients="$clients|TCP ;https ;root/root;www-data/www-data" #local clients="$clients|TCP ;whois ;root/root" # -- SERVER -- # [ WEB ] local servers="$servers|TCP ;http ;root/root;www-data/www-data" local servers="$servers|TCP ;https ;root/root;www-data/www-data" local servers="$servers|TCP ;8443 ;root/root;www-data/www-data" # ruleOut : iptables -t filter -A OUTPUT -o ""$eth"" -j ""$rulesOut"" # ruleIn : iptables -t filter -A INPUT -i ""$eth"" -j ""$rulesIn"" # dropOut : iptables -t filter -A OUTPUT -o ""$eth"" -j ""$rulesOut"" # dropIn : iptables -t filter -A INPUT -i ""$eth"" -j ""$rulesIn""