I am looking to setup a tunnel to my database running on a Windows Server and permanently connect to it from Web apps running on different Ubuntu Servers. Is this possible? How would I connect the Web Servers to the DB tunnel? I have setup an ssh tunnel recently and that works fine but I don’t know how to connect from another Ubuntu server.
Yes you can do this two ways I believe (untested)
On the database server you need to publish the tunnel with cloudflared backed by your database port e.g. cloudflared tunnel --hostname mssql.gibson.test --url
On the ubuntu servers you simply need to connect to the whatever to the subdomain you assigned above. I’m not sure how firewall rules related to this new arbitrary tcp tunnels support, you would want at least IP whitelisting.
On your windows server create a new private subnet say 10.164.0.0/32 and bind your db to listen to that.
Publish that route with
On your Ubuntu server install cloudflared-warp ubuntu package (released a few days ago) and authenticate, and then you can see the 10.164 network so just connect to 10.164.0.1:1433 for example
Okay, this is some helpful information I can test. About method 2, I am currently using the Free Plann, will I be able to authenticate the cloudflared-warp client? I tried adding a location in Teams and it would only let me add my IP address and not the Web Server’s IP.
Yes, it should be fine upto 50 people for free. You dont need to add the webserver IP in Teams admin because that is not an office location. It’s quite confusing, but that IP for a location is largely irrelvant, it’s just used to identify DNS traffic sent to 184.108.40.206 that isn’t secure by WARP.
I just realized that you assumed I was using MsSql on Windows, which of course is correct. Nice
I can’t find any docs on how to install Warp for Ubuntu (https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/download-warp), do you have a location?
Check Cloudflare’s package repository at https://pkg.cloudflare.com/
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.