bash/shell Code复制内容到剪贴板 #!/bin/bash #!/bin/bash case"$1"in start) echo-n"StaringtowriteyourIptbales:..." /sbin/iptables-F /sbin/iptables-X /sbin/iptables-Z /sbin/iptables-AINPUT-ilo-jACCEPT /sbin/iptables-AINPUT-mstate--stateESTABLISHED,RELATED-jACCEPT /sbin/iptables-AINPUT-picmp-micmp--icmp-type8-jDROP /sbin/iptables-AINPUT-ptcp-mtcp--dport22-jACCEPT /sbin/iptables-AINPUT-ptcp-mtcp--dport80-jACCEPT /sbin/iptables-AINPUT-ptcp-mtcp--dport3306-jACCEPT /sbin/iptables-PINPUTDROP echo"OK" ;; stop) echo-n"Stopiptables...." /sbin/iptables-PINPUTACCEPT /sbin/iptables-F /sbin/iptables-X /sbin/iptables-Z echo"OK" ;; *) echo"Usage:$0{start|stop}" ;; esac