|
这是一个Iptables的脚本,对其不解,所以请高手帮忙,内容如下:
#!/bin/sh
IN_TCP_PORTALLOWED="ssh,192.168.8.1 domain smtp http https"
for i in $IN_TCP_PORTALLOWED ; do
IFS=','
set $i
unset IFS ipt_option
port="$1"
[ -n "$2" ] && ipt_option="-s `echo $2 | sed 's/^!/! /'`"
iptables -A INPUT -p tcp $ipt_option --dport $port \
--syn -m state --state NEW -j ACCEPT
done
我想问的问题如下:
1: set $i 是什么意思?
2: unset IFS ipt_option 中的ipt_option从何而来?什么意思?unset ipt_option之后其值会发生什么变化?
感谢! |
|