无法从家里连接到外部 RDS TSG 服务器

osh*_*nen 9 linux command-line freerdp

我们有一个公司的 RDS(远程桌面服务器)TSG(终端服务网关)服务器,它允许员工在家中连接到 RDS 会话,因此他们可以在家中看到工作的 RDS 桌面。

这在他们使用 Windows 7 的家用计算机上运行良好,设置如下:

                        通用设置

                        连接设置

但是,有些用户家里有 Linux 并尝试使用 freerdp 1.2.0。

我已经使用以下命令在连接到公司内部 LAN 的笔记本电脑上对此进行了测试,并且工作正常:

$ xfreerdp /f /rfx /cert-ignore /v:farm.company.com /d:company.com /u:administrator /p:
Run Code Online (Sandbox Code Playgroud)

但是,如果我尝试在未使用公司 LAN 连接(即家庭连接)的笔记本电脑上使用该命令,则会得到以下信息:

freerdp_set_last_error 0x2000C
Error: protocol security negotiation or connection failure
Run Code Online (Sandbox Code Playgroud)

所以我现在尝试在 freerdp 1.2.0 中使用一些新的 TSG 命令,如下所示,但这也不起作用。

我只能看到 4 个与 TSG 相关的命令:

/g:<gateway>[:port] Gateway Hostname
/gu:[<domain>&#93;<user> or <user>[@<domain>] Gateway username
/gp:<password> Gateway password
/gd:<domain> Gateway domain
Run Code Online (Sandbox Code Playgroud)

我在某个地方读到了我只需要/g在我的特定场景中使用的地方,我可能读错了。

所以当我尝试:

$ xfreerdp /f /rfx /cert-ignore /v:farm.company.com /d:company.com /g:rds.company.com /u:administrator /p:
Run Code Online (Sandbox Code Playgroud)

那会给我:

Could not open SAM file!
Could not open SAM file!
Could not open SAM file!
Could not open SAM file!
rts_connect: error! Status Code: 401
HTTP/1.1 401 Unauthorized
Content-Type: text/plain
Server: Microsoft-IIS/7.5
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="rds.company"
X-Powered-By: ASP.NET
Date: Wed, 02 Jul 2014 12:36:41 GMT
Content-Length: 13
Run Code Online (Sandbox Code Playgroud)

考虑到原始命令:

$ xfreerdp /f /rfx /cert-ignore /v:farm.company.com /d:company.com /u:administrator /p:
Run Code Online (Sandbox Code Playgroud)

这适用于 Linux 笔记本电脑,该笔记本电脑连接到公司 LAN 内的网络。

为什么我不能在家里连接到互联网的同一台 Linux 笔记本电脑上使用类似的命令(带有额外的 TSG 参数)?

我是否没有正确使用新的 TSG 开关?

bgr*_*rif 5

您需要确保您键入的命令的布局正确。如果你有一件事情搞砸了或者在错误的位置,那么无论你尝试什么都会出错。

您尝试运行的命令$ xfreerdp /f /rfx /cert-ignore /v:farm.company.com /d:company.com /g:rds.company.com /u:administrator /p:

你需要输入这样的命令 - xfreerdp /cert-ignore /v:WORKSTATION /d:DOMAIN /u:USERNAME /p:PASSWORD /g:GATEWAY

现在,如果您没有为 RD 网关的终端服务器使用相同的帐户,那么您将必须运行此- xfreerdp /v:WORKSTATION /d:DOMAIN /u:USERNAME /p:PASSWORD /g:GATEWAY /gd:GATEWAYDOMAIN /gu:GATEWAYUSERNAME /gp:GATEWAYPASSWORD。需要这样做的原因是,如果正在连接的用户尚未作为授权帐户保存在 rd 网关中,它将拒绝连接该用户。因此,拥有访问连接的所有权限的网关的主要用户将能够强制连接它们,并且应该建立完整的连接。这允许某种力连接

还要确保您在公司使用的路由器配置为可以从办公室外部的远程连接进行访问。如果从未正确设置或配置,这也会导致连接失败。