TShopping

 找回密碼
 註冊
搜索
查看: 2051|回復: 3
打印 上一主題 下一主題

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 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編輯器裡複製起來
在貼到新檔案即可

 

臉書網友討論
2#
發表於 2013-11-10 00:57:28 | 只看該作者
呵呵,明白了  

版主招募中

3#
發表於 2013-11-10 00:57:28 | 只看該作者
知道了 不錯~~~  


*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-5-3 01:02 , Processed in 0.046821 second(s), 18 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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