以下指令存成udp.sh 然後執行即可
#/bin/bash #Createdby http://www.jb51.net #DROP UDP Flood list=`grep nameserver /etc/resolv.conf |awk '{print $NF}'` for i in $list do iptables -A OUTPUT -p udp -d $i --dport 53 -j ACCEPT done iptables -A OUTPUT -p udp -j DROP service iptables save