#!/bin/bash
a=(`cat shu |grep -v "192" |grep -v "127"`)
b=$(cat shu |grep "192")
c=$(cat shu |grep "127")
####shu是一个ip文档###
for i in ${a[@]}
do
iptables -I INPUT -s $i -ptcp -j DROP
done
echo "$b可以通过"
echo "$c可以通过"
#!/bin/bash
a=(`cat shu |grep -v "192" |grep -v "127"`)
b=$(cat shu |grep "192")
c=$(cat shu |grep "127")
####shu是一个ip文档###
for i in ${a[@]}
do
iptables -I INPUT -s $i -ptcp -j DROP
done
echo "$b可以通过"
echo "$c可以通过"