Здравствуйте прошу помощи разобраться.
Есть файл (/run/balance-ipt-restart) вида:
-A PREROUTING -s 10.192.234.108/32 -j balance_isp3
-A PREROUTING -s 10.192.234.108/32 -j balance_isp3
-A PREROUTING -s 10.192.236.102/32 -j balance_isp1
-A PREROUTING -s 10.192.186.115/32 -j balance_isp3
Есть цикл:
for iptrestore in $(cat /run/balance-ipt-restart)
do
iptables -t mangle $iptrestore
done
+ cat /run/balance-ipt-restart
+ iptables -t mangle -A
iptables v1.4.14: option "-A" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
+ iptables -t mangle PREROUTING
Bad argument `PREROUTING'
Try `iptables -h' or 'iptables --help' for more information.
+ iptables -t mangle -s
iptables v1.4.14: option "-s" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
+ iptables -t mangle 10.192.234.108/32
Bad argument `10.192.234.108/32'
Try `iptables -h' or 'iptables --help' for more information.
+ iptables -t mangle -j
iptables v1.4.14: option "-j" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
+ iptables -t mangle balance_isp3
Bad argument `balance_isp3'
for iptrestore in '-A PREROUTING -s 10.192.234.108/32 -j balance_isp3' '-A PREROUTING -s 10.192.234.108/32 -j balance_isp3'
do
iptables -t mangle $iptrestore
done