#!/usr/local/bin/bash
mysql="/usr/local/bin/mysql --default-character-set=utf8 --host=11.11.11.10 -Ns -u lms -pbBVwasdasddYRa4q -D lms"
mace="elect inet_ntoa(address),mask from networks"
echo $mace | $mysql | while read adresy maski;
do
/sbin/iptables -t filter -A FORWARD -s $adresy/$maski -d $adresy/$maski -j ACCEPT
/sbin/iptables -t filter -A POSTROUTING -s $adresy/$maski -d $adresy/$maski -j ACCEPT
/sbin/iptables -t filter -A PREROUTING -s $adresy/$maski -d $adresy/$maski -j ACCEPT
done
exit
Pisane z pamięci pewnie bedzie problem z "/" pomiedzy $adresy i $maski
Pozdro Miłosz