找回密碼
 註冊
搜索
查看: 2429|回復: 3

[問題] 執行iptables 發生錯誤提示

[複製鏈接]
發表於 2011-9-16 16:59:28 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
[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:28 | 顯示全部樓層
呵呵,明白了  
版主招募中
發表於 2013-11-10 00:57:28 | 顯示全部樓層
知道了 不錯~~~  
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|TShopping

GMT+8, 2025-5-10 15:17 , Processed in 0.021560 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回復 返回頂部 返回列表