#!/bin/sh # network : ipv6/mask || dns6/mask local network=""${network}";"${net6}";fe80::/64" # clients : PROTO ; PORT ; UID/GID ; UID/GID ; UID/GID .... | # servers : PROTO ; PORT ; UID/GID ; UID/GID ; UID/GID .... | # forward : PROTO ; PORT | # -- CLIENT -- # [ UDP/TCP/DOMAIN ] #local clients="$clients|UDP ;domain ;root/root;1000/1000" #local clients="$clients|TCP ;domain ;root/root;1000/1000;Debian-exim/Debian-exim" # -- SERVER -- local servers="$servers|UDP ;snmp ;root/root" local servers="$servers|TCP ;ipp ;root/root" # 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""