Sorry for the newbie question.
I just installed Vmare workstation and created a windows server 2012 virtual machine(Set up remote desktop on the server 2012)
The virtual machine is hosted on the below Ip.
The virtual machine Ip.
Adapter settings
Nat Settings
When remote desktop from 192.168.2.120(virtual machine host) to 192.168.88.128 the remote desktop work fine , but when trying from a different PC on the same network(192.168.2.107) to remote desktop to (192.168.88.128) then remote desktop can be access.
The problem in your case is the adapter option you are using in VMWare for your Windows Server. Rather than using a NAT adapter use the Bridged option.
Your answer ends above but if you need a bit insight of your problem then you can read the further part. The NAT IP of Windows server which is the guest machine (192.168.88.128) is reachable from the host machine(192.168.2.120) just because your host machine is internally connected (via a virtual switch) to the guest machine. If you check the network adapters in your host machine then you will find an adapter which will have an IP (192.168.88.1). Your host machine is communicating with your guest machine via this adapter.
The NAT option hides your virtual machine from the physical network. If you want to reach your machine then you have to configure some routing table entries to route packets (heading towards your VM) to your host machine and then again in your host machine you have to write a static route so that the packet received on 192.168.2.120 is forwarded to 192.168.88.0/24
Related
I'm developing a simple web application with springboot in Windows 8.
When I deploy jar file into docker in Ubuntu and run the container, I can see it works on address 10.0.2.15:8082 which is a local IP address, correctly.
What I want is to connect this IP address in my Windows 8 then I will use postman to post some JSON variables etc. But I can't connect 10.0.2.15:8082 from Windows 8.
My VirtualBox adapter attached to NAT and also some rules are given:
I also tried to change host and guest rules otherwise, but didnt work either.
When I run the application in Windows 8 and check it with 192.168.56.1:8082, it gives success and also I can see the same result in Ubuntu with the same address. but can't get it to work otherwise.
I expect to connect ubuntu's localhost in my Windows 8.
I have found the answer;
After shutting down vm, i added second adapter as Host-only Adapter. After starting virtual machine, in terminal by entering "ifconfig" command you can see ip4 address for host-only adapter (in Windows it is Ethernet adapter Virtualbox Host-Only Network). When you try to enter that address in windows and ubuntu, it shows the result.
Also that 192.168.56.1 address is Windows Virtualbox Host-Only Network IPv4 address in my PC.
I believe NAT adapters do not allow direct connection between host and guest, you will need a second Host-only Adapter for that purpose.
See this link for a nice explanation.
I am trying to connect my BACNET client which has been containerized and the BACNET server which is running on the host machine. I am using Docker for Windows on Windows 10 (host machine) with Linux containers.
I have tried the following:
a. Publishing the ports 47808 for the client container with the run command.
b. Running the container with network=host, to access services of localhost.
c. Tried specifying the gateway IP as the server's IP address with run command.
d. Running the container in the same subnet as my server
e. Running the container with the host IP specified and the ports published.
My bacnet server, taken from https://sourceforge.net/projects/bacnet/ always connects to the DockerNAT, 10.0.75.1? Any idea why does this happens? The server application is not a container but an executable file.
Server IP:10.0.75.1 (dockerNAT)
Client container running on host machine.
From a quick google:
For Windows containers this component is not used and containers and
their ports are only accessible via the NATed IP address.
With respect to BACnet, this is going to put you in a world of hurt. You will have to use BACnet BBMD with NAT support in your container to achieve this, and your BACnet Client will have to register as a BACnet Foreign Device. The BACnet Stack at SourceForge does seem to have some NAT support (the code seems to be there but I have never tested it in its original form).
So what you are seeing is 'expected', but your solution is going to require that you become much more familiar with BACnet BBMDs than you ever want to be. Read the BACnet specification carefully. Good luck.
I have an Ubuntu VM (with a Varnish Cache) running in VirtualBox on my local computer. When I'm at home the ip address of my computer is 192.168.178.34. I use the network bridge to connect the VM with my computer. The ip of the VM is then 192.168.178.38. That allows me to reach the cache-server e.g. like that: http://192.168.178.38:6081/index.html
The problem is, i want that this URI is static. My goal is to share the vm with somebody and make a documentation about how to use the cache-server. Therefore it would be great if the ip adress would be always the same, even if the vm will be started in a VirtualBox on a different computer.
Is there a way to set a fixed ip address for the vm, regardless of the host computer?
Thanks a lot!
martin.martin
You can set up a host-only network adapter, which uses the subnet 192.168.56.0/24 by default. Inside the VM, you can set a static IP address.
I'm running VirtualBox on a ubuntu (host), the VM i'm using is fedora (guest). VirtualBox is setup to use the NAT network adapter, and I'm able to get to the internet.
i use Port Forwarding to access ssh and the rails web server
port Forwarding Rules
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
<Forwarding name="Rule 1" proto="1" hostport="5679" guestport="22"/>
<Forwarding name="Rule 2" proto="1" hostport="3080" guestport="3000"/>
</NAT>
now i can access internet on guest machine , and i can logging through ssh
but i cannot access the Rails web server on port 3080
i tried :
localhost:3080
10.0.2.15:3080 #the guest IP
what i can do all i need is SSH and internet connection and open the web site i host on gust machine by Browser in host machine
thanks
Just a stab in the dark here but this might be your issue...
When you provision a new Linux Virtual Machine in VirtualBox, the Network settings for that VM are set to 'NAT'. This results in your new VM being assigned a 10.x.x.x address.
Change this setting to Bridged mode, which will assign your VM an address within the same subnet as your host (most likely 192.168.x.x).
Try to connect to the site running on your host.
If you're still not able to access the site running on localhost, confirm the app isn't blocking connections from your new VM. Add a rule in to your access list (possible iptables) permitting tcp port 80 traffic from your VM's address (found using ifconfig).
Happy hunting!
In your VB you have to set network only with host. It is in preferences->network.
Then you can access your virtual machine via 192.168.56.101 from ubuntu. Port forwarding set on this network card. List it with ifconfig. I recommend to use iptables for port redirects.
I am running a Debian VMware virtual machine on Windows7. I am developing a Rails web app on the virtual machine, I would like to access the app (localhost:3000) from outside the vm, i.e from windows.
Is there a way to do that?
Thanks.
This really depends on how your virtual network adapters are setup between the guest and host. Assuming you have not changed anything, they will be bridged by default. In your VM from a terminal run:
ifconfig
This will give you the IPv4 address (generally a 10.x.x.x) of the virtual interface which you should be able to access from your Windows host. You should be able to put that into your browser on the host with the :3000 port and access it.
If you have modified the network adapters, things may be different. For instance, setting it up as a NAT will give it an address on your physical network; i.e. 192.x.x.x, but accessing it the same. A host only netowork, would also most likely provide a 10.x.x.x address, but should also provide access.