為了確保您的主機安全,我們十分建議您不要進行關閉防火牆的動作,如有需要服務,您應該透過更改 Windows 內建的『具有進階安全性的 Windows Dedenfer 防火牆』規則讓應用程式可以使用。

開啟 Windows 功能表→Windows 系統管理工具→具有進階安全性的 Windows Defender 防火牆。

點選輸入規則,並點選右方的新增規則。

依據需求開啟 TCP 或是 UDP Port。

例如:
Minecraft 預設為 TCP 25565。
FiveM Server 預設為 TCP 與 UDP 30120。
網頁伺服器 TCP 80 與 443。

即可完成操作。

也可以使用指令的方式來開啟,透過開啟命令提示字元並輸入以下指令即可開通。

FiveM 開防火牆指令(兩者皆須執行):

netsh advfirewall firewall add rule name="Allow FiveM UDP" protocol=UDP dir=in localport=30120 action=allow

netsh advfirewall firewall add rule name="Allow FiveM TCP" protocol=TCP dir=in localport=30120 action=allow

Minecraft 開防火牆指令:

netsh advfirewall firewall add rule name="Allow Minecraft TCP" protocol=TCP dir=in localport=25565 action=allow

網頁伺服器開防火牆指令:

netsh advfirewall firewall add rule name="Allow Web http" protocol=TCP dir=in localport=80 action=allow
netsh advfirewall firewall add rule name="Allow Web https" protocol=TCP dir=in localport=443 action=allow