你係port forword 還是係router 開port? port forword 就咁
router 開port 要ssh 去router, 要建立一個shell script 叫 firewall-start, 擺喺 /jffs/scripts 條path
即係
/jffs/scripts/firewall-start
個script裡面係咁,例如喺router安裝咗transmission ,要打開 51413 udp/tcp port (transmission 預設開啟嘅通訊port)
#!/bin/sh
iptables -I INPUT -p tcp --destination-port 51413 -j ACCEPT
iptables -I INPUT -p udp --destination-port 51413 -j ACCEPT
用nano/vi 寫入去save,
chmod +x /jffs/scripts/firewall-start
,以後開機就會執行呢打開呢個port