Connect to host from VSCode session running in container - vscode-remote

I'm using a container to develop for an embedded system. To interact with the debugger I need openocd running on the host machine (as it needs USB access, and it's on a Windows machine therefore I can't access the USB port from the container), and connect to it with a gdb running in the container. I'd like to know if it is possible to forward/connect to a port from the host machine - from all that I've read until now this does not seem to be possible?
My current workaround is to run an SSH server in the container, forward it's port and open an SSH connection from the host to the container with reverse forwarding the openocd port. But that is quite a bit more convoluted than I'd like.
Just exposing the port to the local network and connecting via the public IP came to mind as well, but our corporate firewall blocks that.

Related

Can't connect to SQL Server in docker from Hyper-V virtual machine

I have a SQL Server instance in docker which maps its port 1433 to host 1433.
It's working and I connect to it.
Next, I have a Windows (actually, its old Windows 7) virtual machine in Hyper-V on same host. Virtual machine can see host (to be specific at ip 192.168.10.1).
But from virtual machine I can not connect to SQL Server on port 1433. I can't simply open a socket from virtual machine (have tried though python).
I've tried to stop docker container and start simple web server on 1433 port and I can easily connect to it from virtual machine. But once SQL Server appears there, something goes wrong.
Any ideas, what may be wrong or what to check (just got a humble idea that may be caused by MTU, but not yet checked - makes sense?)

Connecting to Volttron Central server from Windows PC on device LAN

I have a RPi running an instance of volttron-central. I can VNC into the RPi and view the Web UI from a browser pointed to localhost, so I know that it is running. However, when I attempt to connect from a PC connected to the same LAN using the RPi's IP address, I get "refused to connect" error.
Is this a security feature? If so, is there any-way of viewing the WEB UI from a different machine, or does it need to be running an instance of volttron-central locally?
Edit your config file to use an external address (e.g. not 127.0.0.1). In VOLTTRON_HOME (~/.volttron) edit the config file. Change the bind-web-address setting to equal (what you have above as 192.168.1.4) to http://192.168.1.4:8080. Then restart the platform.
Note: you should also make sure your /etc/hosts file has a mapping from the 192.168.1.4 onto your hostname, then you could goto https://foo:8080 rather than using the address. This will work with the bind-web-address, but not the vip-address.

Server-client chat program - VMware on the same machine

I'm trying to create a server-client chat program in c for Linux.
Considering I only have one computer (a power house at that) I'm trying to create it so I can talk to a server with vitual machines running ubuntu. The host OS is windows 10.
I have booted up two different vitual machines with ubuntu (using VMware) and set the network connection to be bridged.
I have the server program working, sorta, in that it connects to a socket (5000) and listens to wait for a client to connect.
On the client I run the client and it never seems to connect to the host and I'm not sure why. I'm not sure if I need to specify the IP address or port number or what (I'm totally new to this). This is supposed to be a TCP connection that works will work within all machines within the subnet.
Here is what I have for the server:
Server-chat.c
Here is what I have for the client:
client-chat.c
After I run the server I get to the listen part.
I switch to the client running VM and run my client program "./client-chat 127.0.0.1"
assuming that's what I need for it to connect but apparently not. Any direction or resources would be much loved.

rdc windows10 to headless VM using a port number fails

I upgraded my desktop machine from windows 8 to 10 and now I'm unable to connect to any of my Vms (hosted on another server) using RDC.
I have one server(Ubuntu no GUI) that host multiple VM's(windows and Linux w and w/o GUI) using VirtualBox. From my laptop I normally connect with RDC using the host(server) ip followed by port number (192.168.0.2:3396 assigned during create VM process) works fine, at that point I adjust network setting(static ip) for the LAN and exit. etc etc..
On the windows 10 desktop I receive and error; This computer can not connect to the remote computer. I can however connect with the ip address (192.168.0.5) no port. this part is fine for existing Vms that have static ip. I need to connect and assign the ip.
Thanks for any feedback or suggestions

138 Connection Timed out on NoMachine Client - always

I am trying to connect from a NoMachine client on a Windows 7 machine to an OpenSUSE machine. I can only connect via NX however I keep running into Error 138:Connection Timed out. I can connect via SSH on my Command prompt however Seem to be unable to connect via here. Does anyone know a solution - been doing this since morning with no light in sight!
Routers supporting UPnP or NAT-PMP are configured automatically to pass connections to NoMachine and all required information is displayed at initial screen (Welcome to NoMachine).
Routers not supporting UPnP or NAT-PMP and Firewalls have to be configured manually to pass traffic to port 4000 (NX protocol), 22 (SSH protocol on Linux/MacOSX) or (4022) (SSH protocol on Windows).
So, check the configuration first.
I have a similar issue setting up my ftp server.
There are a couple of possibilities why the connection was not established, but in my case, and perhaps yours, you must allow the service you're trying to execute in your firewall settings.
In my case I allowed the ftp port and some other specific port for tcp communication.
This (and the proper service, router, etc setup) allowed the communication to be established.

Resources