#!/bin/bash IPT=$(which iptables) LO="127.0.0.1" loop () { $IPT -A INPUT -i lo -d $LO -j ACCEPT $IPT -A OUTPUT -o lo -d $LO -j ACCEPT } loop