TShopping

標題: 執行iptables 發生錯誤提示 [打印本頁]

作者: woff    時間: 2011-9-16 16:59
標題: 執行iptables 發生錯誤提示
[root@localhost ~]#sh firewall.sh
iptables: No chain/target/match by that name
iptables: Bad policy name
iptables: Bad policy name
iptables: Bad policy name
: command not foundine 10:
『ptables v1.3.5: Invalid target name `ACCEPT
Try `iptables -h』 or 『iptables –help』 for more information.
『ptables v1.3.5: Invalid target name `ACCEPT
Try `iptables -h』 or 『iptables –help』 for more information.
: command not foundine 15:
『ptables v1.3.5: Invalid target name `ACCEPT
Try `iptables -h』 or 『iptables –help』 for more information.
『ptables v1.3.5: Invalid target name `ACCEPT
Try `iptables -h』 or 『iptables –help』 for more information.
: command not foundine 19:
『ptables v1.3.5: Invalid target name `ACCEPT
Try `iptables -h』 or 『iptables –help』 for more information.
『ptables v1.3.5: Invalid target name `ACCEPT

這種情況出現的原因是 iptables_mail.sh 文件格式是Windows格式,是因為文件末尾^M導致。
需要將文件格式轉化為Unix格式即可。
可以使用Gvim等編輯器幫助轉換。

或是直接在VI編輯器裡複製起來
在貼到新檔案即可

作者: 帥儿    時間: 2013-11-10 00:57
呵呵,明白了  
作者: vbefmygy    時間: 2013-11-10 00:57
知道了 不錯~~~  




歡迎光臨 TShopping (http://www.tshopping.com.tw/) Powered by Discuz! X3.2