Connect to Redis on WSL Windows 10 from remote client - redis

I've a Redis instance running on a Windows 10 Machine and connecting to Redis locally works perfectly.
When i try to reach Redis from a remote client in the network it doesn't seem to work.
The
Windows machine has the ip 172.22.23.112
Ubuntu WSL 172.22.160.1.
The Firewall for Windows is down, the Port 6379 is enabled on Ubuntu, firewall is down there too.
in redis.conf
bind 127.0.0.1 172.22.23.51 172.22.23.55
protected-mode no
i thought when i connect to the windows machine with a redis client and the appropriate port, windows will forward this request to the WSL Redis Server?
Since i get a timeout i guess i'm doing something wrong!

i set bind to 0.0.0.0
and issued the following command in windows
netsh interface portproxy add v4tov4 listenport=6379 listenaddress=0.0.0.0 connectport=6379 connectaddress=172.x.x.x
where connectaddress is the WSL ip address
connection works, now i've to ensure
the wsl ip address is static
the command is issued everytime the computer starts
other than that it works

Related

Not able to connect ESXi host remotely via a Secure Shell client

I have installed a CentOS in VMware server and if I open the VMware console then I am able to connect to the server but if I use putty in my desktop then I am not able to connect to the host.
1) Started SSH service in the VMware host configuration.
2) Added IP and hostname in the /etc/hosts file
Thanks #Kyle Ruddy. I fixed this issue by allowing certain IP in the Firewall settings. Its working now.

Network issue between VMWare guest and windows host

I have a windows 7 host, on which I am also running a windows 7 virtual machine, essentially I'm trying to setup buildbot, the host runs the build master while the vmware virtual machine will run the build worker. The virtual machine network adapter is configured to host only. The virtual machine It has an ip address of 192.168.1.12, while the host has an ip address of 192.168.1.92. Both addresses are static IPs there's no DHCP involved
I can ping the host from the virtual machine, and I can ping the virtual machine from the host.
But when I try to get both the build master(host) and the build worker(vm) to communicate, nothing seems to happen. Looking at the twisted log in the vm I can see error messages along the lines of
"TCP connection failed to connect to host on ip 192.168.1.92:8999"
Note the buildbot.tac on the build worker(vm) has the ip address of the host (192.168.1.92) and the port on which to connect 8999
I have tried netstat -ano on both the host and the vm and I cannot see any connection between the two.
I have tried turning off the firewall inside the virtual machine, just in case, but no success there either
Any suggestions.

I cannot access the default Apache webserver page, which is hosted in a VirtualBox VM, from my machine

My machine is a regular laptop with Windows 7. I have a Virtualbox VM running Ubuntu Server 14.04.1 and I have apache2 installed. When I try to access the default webserver page (10.0.2.15) from my machine, it cannot find the page. I have disabled my machine's firewall so that isn't causing the issue. The network for my VM is NAT, but I also tried the bridged adapter setting to no avail. Any suggestions would help.
Can you ping the server? If so, try the netstat command in server terminal to determine if it listens to port 80. If you cannot ping it, check the network address, f.x with ifconfig
If you can ping apache from the server, you probably have a problem with the network.
Try to add an host only interface. Then, in your VM, sudo ifconfig. Use the eth1's ip.

Overcoming the loopback device on a VM

Due to various constraints I've found myself in the following situation:
I have access to an API which starts a service on the loopback device of a computer (127.0.0.1). This computer is actually running on a VM being hosted by the client. The client will be using the same API to connect (which, of course, will connect via the loopback device).
The API is intended to be a service which executes on the same machine as the host and the client - it's a communication layer essentially. The two software components (ie, the endpoints), are incompatible, so we have them configured this way: the client hosting the server on a VM.
The VM is Virtualbox, with a Bridged Adaptor network setup.
They're both running Windows XP.
How do I get them to communicate?
EDIT: I cannot make changes to the communication service, but I can make whatever other changes are necessary to the VM or the host.
Expanding on #EJP's suggestion to use port forwarding, the required command is covered in User Manual, ยง6.3.1 Configuring port forwarding with NAT. Suppose your service on guest "VM name" is a web server listening on port 80. You can forward host port 12345 to guest port 80 like this:
VBoxManage modifyvm "VM name" --natpf1 "service,tcp,,12345,,80"
When you browse http://127.0.0.1:12345 on your host, the guest server will respond. You can delete the setting using something like this:
VBoxManage modifyvm "VM name" --natpf1 delete "service"
You can examine the setting using something like this:
VBoxManage showvminfo "VM name"
You're going to have to change the service not to bind to 127.0.0.1 if you can. Otherwise you will have to install some kind of proxy in the VM, or organize some port forwarding if you can.

How do I connect to a localhost service from a hyper-v VM?

I have a WCF service running on "http://localhost:12345/ServiceName". I also have a VM running under hyper-v in Windows 8 public beta. Is there any way that I can connect to this service from the VM? I cant seem to set up a bridged network connection in the hyper-v manager. An alternative would be for the WCF service to bind to the Win8 machine name or IP, but I don't know how I would find out what that endpoint is from the VM side. The WCF service can be changed in any way needed...
Any help would be much appreciated!
Many thanks,
Jon
Not sure this will work with a Windows VM, but I managed to open host's URL from inside an Ubuntu VM:
On Host disable the Firewall or add a rule to allow connections to the respective port (12345 in your case).
On VM edit /etc/hosts, replace 127.0.0.1 localhost with IP_OF_HOST localhost.
Now http://localhost:12345/ServiceName should open from inside the VM.
you can create Virtual Switch in Hyper-V(Virtual Switch Manager) Then you can connect it to your VM(right click on VM ->setting -> create Legaci network adapter -> connect abouve virtual switch to it). after that you should install intigration to Hyper-V for your OS in VM. then you can connect to your virtual switch in your VM. after that you can access internet as well. you your host machine has it. type your host machine's IP address in web browser and you can access any service in host machine
You also need to run as admin on the host machine command shell netsh http add urlacl url=http://*:12345/ user=Everyone where 12345 is the port number of your service.