Board logo

標題: [操作疑難] 求助 - port forwarding 連返屋企部 raspberry [打印本頁]

作者: andy_chan    時間: 2020-6-13 12:57     標題: 求助 - port forwarding 連返屋企部 raspberry

如題, 我有部 raspberry, 想係街連返屋企部 raspberry, 我用 asus router, 跟佢官方說明設定左 ddns, 註冊有個 xxx.asuscomm.com, 亦有係 「虛擬伺服器」指定俾部 raspberry, 設定用 http sever, port 係 80, 通訊協定係 both, 內部通訊埠冇設定

另外, raspberry 有參考呢編教學修改左  /etc/dhcpcd.conf

https://thepihut.com/blogs/raspb ... c-ip-address-update

但係都唔成功, 係 chrome 連唔到入 xxx.asuscomm.com, 但係用 raspberry 內置 vnc 用 xxx.asuscomm.com 又得(port 唔用 80, 跟番佢用 5900)

唔知邊度出左問題, 唔該晒
作者: KamSing    時間: 2020-6-13 13:01

Maybe ISP block Port80, try another port
作者: andy_chan    時間: 2020-6-13 13:39

唔該晒先,其他 port 都試過唔得,包括 8080或任意設定都唔得
作者: 觀星是答案    時間: 2020-6-13 15:41

你係屋企內,直接用 internal IP (192.168.x.x) 連唔連到?
作者: sp4148    時間: 2020-6-13 15:41

去不到,出什麼error?
作者: silvester    時間: 2020-6-13 15:49

去唔到埋check 下個raspberry pi 入面個application
作者: andy_chan    時間: 2020-6-13 16:16

本帖最後由 andy_chan 於 2020-6-13 16:17 編輯

回覆 4# 觀星是答案

係屋企係連到的, 用到 SSH, 亦可以用手機app睇到鏡頭

回覆 6# silvester

可以用 SSH 操作, 亦可以用 VNC圖形介面
作者: HKEPC852    時間: 2020-6-13 16:22

外部通訊埠:80
內部通訊埠:80
本地 IP 位址:192.168.x.x
通訊協定:TCP

我都係咁set,樓主試下~唔得你PM我remote幫你睇睇
作者: KamSing    時間: 2020-6-13 16:51

每個Application 起碼要開一個PORT

VNC default 用 TCP PORT 5900
所以 Local Port:5900, Protocol: TCP
Port Range就自己定, 如果唔係用5900, 連VNC就要打返個PORT

如果要用SSH, 就要Set 第二條Rule

要Forward 全部Port 就要用DMZ...
作者: samiux    時間: 2020-6-13 17:00

基于资安理由,我个人不建议置草莓于非战区。

via HKEPC IR Pro 3.6.1 - Android(3.3.1)
作者: andy_chan    時間: 2020-6-13 17:12

每個Application 起碼要開一個PORT

VNC default 用 TCP PORT 5900
所以 Local Port:5900, Protocol: TCP
P ...
KamSing 發表於 2020-6-13 16:51



開左 DMZ 就成功了, 唔該師兄
作者: andy_chan    時間: 2020-6-13 17:17

基于资安理由,我个人不建议置草莓于非战区。

via HKEPC IR Pro 3.6.1 - Android(3.3.1) ...
samiux 發表於 2020-6-13 17:00


即係每個 Application 獨立開一個 Port 會安全D? 唔係好明實際作, 不過都試吓, 始終都係安全D好, 謝謝意見
作者: samiux    時間: 2020-6-13 17:23

即係每個 Application 獨立開一個 Port 會安全D? 唔係好明實際作, 不過都試吓, 始終都係安全D好, 謝謝意 ...
andy_chan 發表於 2020-6-13 17:17

是。

如果一定要置草莓于非战区,我个人认为要在草莓中安装适当的资安设备或设置,并经常监控这个草莓的活动。

via HKEPC IR Pro 3.6.1 - Android(3.3.1)
作者: kaito2307    時間: 2020-6-15 09:14

如題, 我有部 raspberry, 想係街連返屋企部 raspberry, 我用 asus router, 跟佢官方說明設定左 ddns, 註冊 ...
andy_chan 發表於 2020-6-13 12:57


方法唔難, 你先要CONFIRM你個DDNS係咪WORK, 整完試PING(如果ROUTER有開)
之後RASPBERRY果度試下唔好用5800, 改做其他, 之後連入果部機打返DDNS個ADDRESS後面加":" PORT 最後兩位數.
例: VNC(5812)
address:12

有個PT注意, 要睇ISP有無BLOCK咩PORT, 不過58XX果D好少會BLOCK, 同埋係咪出街係真IP, 如果DOUBLE NAT, 真係好難幫到你.
我解釋得唔好, 唔好意思.
作者: javacomhk    時間: 2020-6-15 17:14

係要睇你個Server App用邊個port 先響router 開個port去個server度架。你可以用
sudo netstat -ntlp
睇下邊個port 用緊先去router 度開。
作者: volospin    時間: 2020-6-15 17:38

本帖最後由 volospin 於 2020-6-15 17:40 編輯

I did not read the whole thread... but

1) in ASUS router, setup DDNS, you did
2) in ASUS router, setup specific IP address 192.168.xxx.yyy assign to MAC address of Rasberry, you try
3) in Rasberry, setup LAN port to be DHCP
4) in Rasberry, setup Rasberry remote access port to... say easy to remember 12380
5) in ASUS router, setup port forward to forward external 12380 to internal IP say... 192.168.xxx.yyy port 12380
6) use mobile phone use mobile network (not wireless) to access your DDNS domain 12380... say... http://something.asuscomm.com:12380, try until you get it

This should be as easy as that.
作者: andy_chan    時間: 2020-6-18 16:36

唔該晒, 已解決, check 返每個 Application 個 port 位, 再開返俾佢就搞掂了, 之前冇搞清楚 port 位, 所以搞極唔得, 低級錯誤, 依家每個 Application 都要登入, 安全D





歡迎光臨 電腦領域 HKEPC Hardware (https://h2.hkepc.com/forum/) Powered by Discuz! 7.2