搭建好群晖系统后,从外网远程访问内网机器的方式有很多种。常见的有群晖套件中心的VPN server,反向代理等。这里介绍一种使用firefox container的方式实现对内网机器的web访问。

下载 jlesage/firefox docker映像
启动Synology DSM container manager,在注册表里搜索firefox,找到 jlesage/firefox,并下载最新版本。



运行firefox container
在映像列表中选中 jlesage/firefox,点击“运行”。

在常规设置里设置容器名称,按系统配置实际情况启用资源限制,勾选”启动自动启动“和“通过Web Station设置网页门户”,设置容器端口。如果已经申请好证书的话,可以选择HTTPS。点击“下一步”。

在高级设置里,设置环境变量LANG为zh_CN,SECURE_CONNECTION为1,SECURE_CONNECTION_VNC_METHOD为SSL,VNC_PASSWORD为自己的密码,网络设置为host模式,点击下一步。




点击“完成”运行firefox container。

配置Web Station网页门户
Container Manager会提示“已创建jlesage-firefox-1。请进入Web Station配置容器的网页门户。”点击确定。

选择“基于端口”,并设置HTTPS端口号。我这里设置为5901端口。点击“新增”。

设置完成后,在Web Station里查看正常。

浏览器访问内网
访问前先做好内网端口映射,可以在宽带路由器上设置把某个端口(比如5901端口)映射到NAS的5901端口(我们在Web Station里设置的端口)。然后通过https://nas_ip_or_domain_name:5901访问firefox docker。

输入刚才设置的VNC_PASSWORD即可进入firefox。

输入内网机器的web地址即可访问,跟在本地局域网内一样。中文也可以完美支持,以后可以随时随地访问内网的机器了。👍

文章评论