# this file normally resides in /etc # as you can see, together with the global firewall file # # greetz, # harry EXT_IF=eth0 #HOSTNAME= # define input chains run_input_chains() { # echo "Installing input rules" # define chains # $IPTABLES -N To_Hostname # define what they are # $IPTABLES -A INPUT -i $EXT_IF --destination $HOSTNAME -j To_Hostname # define rules for your different chains # log all the rest # $IPTABLES -A To_Hostname -j LOG --log-prefix "illegal To_Hostname: " --log-level notice # $IPTABLES -A To_Hostname -j DROP echo "No input rules" } # define output chains run_output_chains() { # echo "Installing output rules" # define chains # $IPTABLES -N From_Hostname # define what they are # $IPTABLES -A OUTPUT -o $EXT_IF --source $HOSTNAME -j From_Hostname # define rules for your different chains # log all the rest # $IPTABLES -A From_Hostname -j LOG --log-prefix "illegal From_Hostname: " --log-level notice # $IPTABLES -A From_Hostname -j DROP echo "No output rules" } # define forward chains run_forward_chains() { # echo "Installing forward rules" # don't forget to uncomment this, if you want to forward packets # echo 1 > /proc/sys/net/ipv4/ip_forward echo "No forward rules" }