Connect to remote Docker Swarm from Windows - windows

I would like to connect to a remote Docker Swarm (Ubuntu) from a Windows box.
In Linux it seams that you need to update the daemon.json file.
How do you achieve this in Windows?
Thanks!

The Docker engine has two parts, the daemon service (dockerd) that's running on your Ubuntu box, we'll call it the "server". Then the docker cli is what you can run from that server (docker) or from anything like your Windows machine (docker.exe). We'll call this the "client".
The client can talk to the server over two main ways, the socket, and a TCP port. The socket is usually reserved for local connections (SSH into the server and the docker client defaults to using the socket file to talk to the local server) or SSH tunnels, which are not something that works out of the box on Windows (maybe if you try the Windows Subsystem for Linux on Windows 10).
The other connection option is TCP, which isn't enabled on the server out of the box for security reasons. It has no authentication when enabled, so you'll want to use TLS to authenticate remotely, so Docker has steps for that. It's not a 3 min solution, so many look for an easier route to solve this problem.
The easier option for enabling TLS and the TCP port on the server is to use Docker Cloud with the "Bring Your Own Swarm" feature, which manages the certificates and security for you.

Related

Setting up clients to connect to openvpn service on ubuntu

I am using openvpn on ubuntu, not openvpn-as because I need several clients to connect. I can get the server to startup, but I want windows clients to connect to it. I've downloaded the OpenVPN client for Windows. What configuration files do I need to place on the client, and what changes do I need to make on the server side so that I can give access to different addresses and ports on those addresses that are accessible by the OpenVPN server? Thanks for your help.

WSL2 - Docker without Docker Desktop - cloud_sql_proxy does not work with VPN

So far I have worked/developed with Windows 10, Docker Desktop and WSL2. Now I had to remove Docker Desktop for licensing reasons and decided to run Docker natively in my WSL2 distro. This also works flawlessly. I can access my Docker applications in WSL from Windows.
For the data connections I use the cloud_sql_proxy from Google.
Again, no problems here. However, they occur as soon as I turn on the VPN. Then I can't connect to the database anymore. Everything else works!
The following:
VPN turned off. Connect to the DB via the cloud_sql container. Everything Okay
turn on VPN. DB connection remains established, but breaks down as soon as a reconnect is necessary.
VPN switched on. LOG in container: net/http: TLS handshake timeout
Using
gcr.io/cloudsql-docker/gce-proxy:1.31.2
Windows 10
Ubuntu-20.04
VPN L2TP (Windows nativ)
Using the cloud_sql_proxy service instead of the Docker container works. Can anyone help me with this? Why does it not work with the Docker container?

Steps required to SSH into Azure Windows VM from a Linux VM

Having created a Windows Azure VM and opened ports 3389 and 22 for inbound RDP and SSH connections, respectively.
I can successfully connect to the vm via RDP from a remote Windows PC.
Testing SSH connection in the Portal succeeds. However trying to connect from a remote Linux VM using SSH fails.
Given that SSH connection test within the portal succeeds, it suggests that (1) it is possible to SSH into a windows VM; and (2) there is no other config require on the server ie installing OpenSSH (or similar) / Copying over key file(s) to some location etc. However, the help steps in the Azure Portal for my Windows VM, for making remote SSH connections suggest that maybe a public key needs to exist on the server and that I need the private key on the LinuxVM I am trying to connect from.
Please could someone help me understand if ssh into windows Azure VM is possible and if so, the requirements / minimum set of steps (on the target Windows VM and the source Linux VM) I need to get to a state that I can successfully SSH.
Other posts re similar question posted have not helped me connect via ssh. I have not found a 'golden source of truth' on Microsoft docs. Maybe I missed it.
Thank you.
A Windows Server doesn’t typically come pre-built and ready to go with SSH access and it requires some setup. You can follow this to set up your Azure VM for SSH access. You can configure SSH on a Windows Azure VM for access, check out How to Set Up OpenSSH on a Windows Server. After deploying the OpenSSH, you can follow the steps about connect via SSH with client in the Azure portal on your Linux client to access that Windows VM via SSH.

Connect to the Docker container from host network

I have a WcfService under .NET Framework, it is older server-side of application. I need to migrate it to the Windows Docker container on machine with Windows 10.
Beside that there will be running few IIS containers, that will interact with this WcfService but container to container communication is clear to me.
Then I have a client desktop application that must also be able to connect to the WcfService. In configuration file I specify Port and Hostname of wcfservice so I can connect.
This client may run on any machine within same LAN as WcfService container.
How should I construct command docker run <params> wcfservice and are there any other steps (firewall, Hyper-V settings,...) I need to do so that LAN can see this service and how can I retrieve hostname and port from this container?

Tunnel to heroku database?

I've got a django project on heroku and it uses postgre database on heroku (ec2). It all works fine, but on one computer I don't have access to postger port 5432 so I need to setup a tunnel from my computer to there. Is that possible?
You will need to have some sort of access to an intermediate host to make it possible. Heroku does not support it out of the box.
Corkscrew does SSH over HTTP proxy. Then you can open a transparent proxy like tsocks. This way you don't necessarily have to know about the firewall.
This all applies to Linux and possibly Mac. On Windows you can pipe your connection through Putty.

Resources