Shunze 學園 (http://www.shunze.info/forum/index.php)
|- Sophos XG (http://www.shunze.info/forum/board.php?boardid=36)
|-- 《分享》Passive FTP於XG上的參數調校 (http://www.shunze.info/forum/threadid.php?boardid=36&threadid=2062)


作者: shunze 發表時間: 2017-11-29, 11:56:

《分享》Passive FTP於XG上的參數調校

FTP不同於其它服務,除了透過TCP 21 Port來傳遞Command外,
還需透過另一個port來進行資料傳輸。

在一般Active Mode下的FTP Server,在命令傳遞完成後,
會由Client指定一個port,讓FTP Server透過此Port向Client端傳輸資料。

但若user在防火牆內,防火牆不見得能mapping這個隨機的Port給內部所有user的IP來提供對外服務,
所以出現了Passive Mode FTP來解決此問題。



Passive Mode FTP跟Active Mode一樣,在一開始傳遞命令時,都是透過TCP 21 Port來進行。
但在傳輸資料時,則由FTP Server指定一個port給外部user來連結。
因為FTP Server只有一個IP,mapping這個隨機port給此單一主機相對簡單多了∼




不過在Sophos XG上,明明已經mapping標準的TCP 21 port與指定的隨機port範圍給內部Passive Mode FTP Server了,
為什麼FTP服務還是無正常使用,遠端FTP server的目錄結構無法顯示??

原來在Sophos XG上,除了mapping標準的TCP 21 port與指定的隨機port範圍外,
還必需在console下,將 ftpbounce-prevention 的參數值由 control 變更為 data 才能順利導通FTP服務。

set advanced-firewall ftpbounce-prevention data

ftpbounce-prevention 參數修改為 data 後,FTP總算能正常使用了!


參考資料
Enable FTP Passive port range
Sophos XG: Passive FTP

Powered by: Burning Board 1.1.1 2001 by WoltLab
Taiwan Translation by Achi