Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
SSH Tunnel connection fails with DNS #686
The tunnel itself is fine through another server, however, when trying to connect to the database using a custom domain name with a custom DNS server, it fails.
Changing the address to its internal IP allows a successful connection. Other systems are successfully connecting using the domain name.
The SSH tunnel has the custom DNS server, and can successfully look up the domain.
@confuser If you are using an SSH tunnel to forward local ports to a remote host, the database connection string from Robomongo's point of view will be the local hostname and port (eg
Robomongo (or other apps) will not try to resolve names on the other end of the tunnel; the whole point of the tunnel is to securely connect two endpoints that otherwise do not have direct access. If your custom DNS resolves from a normal command line without extra configuration, the same DNS should work from Robomongo.
If the problem is something else, can you provide more details on your set up?
Other apps such as WinSCP handles this scenario just fine. The host is set to a custom domain, and the tunnel is set to the domain which major DNS servers can lookup.
Running the ssh tunnel command via the command line works fine too.
RoboMongo is the only app I currently use with tunnel capabilities that does not perform the DNS look-up of the host, on the tunnel'd host.
@confuser How does WinSCP add the DNS to the host environment? Are you using a proxy setup in addition to (or instead of) a tunnel? Robomongo isn't doing anything special with name resolution.
It looks like WinSCP can add name resolution when using a proxy (http://winscp.net/eng/docs/ui_login_proxy#dns) but I don't see any options for doing this as part of ssh tunnelling: http://winscp.net/eng/docs/tunneling. Can you include some more details on the connection set up so we could try to reproduce this?
In the non-Windows world an ssh tunnel does not imply any changes to DNS.