#!/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/$maskihttp://193.106.153.96/255.255.255.248-d $adresy/$maski http://193.106.153.96/255.255.255.248http://193.106.153.96/255.255.255.248-j ACCEPT /sbin/iptables -t filter -A POSTROUTING -s $adresy/$maskihttp://193.106.153.96/255.255.255.248-d $adresy/$maski http://193.106.153.96/255.255.255.248 -j ACCEPT /sbin/iptables -t filter -A PREROUTING -s $adresy/$maskihttp://193.106.153.96/255.255.255.248-d $adresy/$maski http://193.106.153.96/255.255.255.248 -j ACCEPT done
exit
Pisane z pamięci pewnie bedzie problem z "/" pomiedzy $adresy i $maski
Pozdro Miłosz