Failed to ping vm ip address from another device (android phone) under same network - networking

i have network issue from using vm.
This is ifconfig info of vm ubuntu 16.04.
This is ipconfig info of my host machine.
And this is the network settings of vm.
I able to ping vm ip addr from host machine.
I able to ping phone ip addr from vm.
I unable to ping vm ip addr from phone under same network.
Im bad in networking. Any of you have good clue can help me solve this issue?
Appreciate your help & Thanks in advance.

NAT has four different types, and it always works as a firewall. That is why we need UDP traversal and hole-punch sometime. If you want other devices like host and phone build a connection to vm, you need firstly connect from vm to thoses deivces to build a "hole" as a path.

Related

issue when using bridge connection

I have a windows 10 host machine connected to internet through wifi. . I have installed vmware workstation in it.
I have created a linux virt machine and set a static ip address and used a bridged connection.
Each time I start the vmware machine intenet connection on all pc of the office is dropped. It is not an ip confict problem because other pc get range of ip from 192.168.1.100 to 200. The host and vmware machine have 192.168.1.12 and 192.168.1.23.
Everything is ok when I use NAT.
May sb help me please? Thanks in advance
Well, if you want a static ip you need to set it on the machine (here a VM) and the router/dhcp server so that it knows this machine doesn't need an ip and which ip it has...

How do I access my Ubuntu Server installed on Virtual box from anywhere in the World

I am trying to make an IOT using nodemcu and a LED. I want to access the Ubuntu Server(which is installed in the virtual box) through some other network(outside my LAN). How can I do it? I read many articles online, but I am not able to figure it out. I tried port forwarding but it did not work.
I am not sure what I am doing wrong. Is there's a problem in the port forwarding, or I am following a wrong method.
I have installed Ubuntu Server 16.04 LTS on my laptop via VirtualBox. I have installed LAMP. Also, network set to bridged adapter, plus I have dynamic IP
As I logged in, I ran ifconfig. It gave me the inet address as 192.168.16.101
Did you set the VM network interface to be NAT or Bridged?
If it is NAT, then you are essentially double NATTed which means you will need to port forward from your router to the VM host and then you will need to port forward from the host to the VM as the IP assigned will be local to the host machine.
However, the easiest is to set the VM network interface to Bridged.
This will mean the VM will be able access your network directly as it should be on the same subnet as your laptop and appear as another device, which your router will be able to port forward to.

I can't assign an IP address to vmware VM from DHCP pool

In GNS3, I have configured the DHCP pool on the router R1, and I have a vmware VM (Ubuntu 16.04), another router R2 and VPCs are connected to R1. The R2 and VPC can get their IP address without a problem, however, the vmwareVM can't receive the IP address.
Note that:
the station is configured as host-only
the connect a host virtual adapter to this network is checked
the VMware Workstation DHCP Server is turned OFF
No configuration on my local PC Network Connections (DHCP)
Once I type the command dhclient eth0 to get the IP address from dhcp, it freezes and returns nothing and no IP address is assigned.
I want to know what is the problem that causes that issue and how to solve it.
Thank you.
My mistake was in the configuration of my VMware network adapter (VMnet2) in my network adapter in my host.
so in order to get the IP address from the DHCP router: I did the following steps:
Create a virtual network (VMnet2) in the virtual network editor
of VMware.
I checked the "Host-only" option
I checked the
"connect a host virtual adapter to this network" option
Uncheck the "use local DHCP service to distribute IP address to VMs".
Do not change the default configuration of the VMnet from your
network connexion options.
I hope that will help someone has the same issue as me

Boot2Docker: how to access container with Bridged Networking

I am running Boot2Docker in Virtual Box on Windows, using VB bridged networking. The IP address of my PC (192.168.2.2) and of the VM (192.168.2.30) is determined by the DHCP server.
I have configured the docker bridge as follows:
File /var/lib/boot2docker/profile:
EXTRA_ARGS='--bip=192.168.2.192/25 --fixed-cidr=192.168.2.224/27'
From my Windows PC I can successfully ping the folloing IP addresses:
192.168.2.30 (ip address of eth1 in the Docker Host)
192.168.2.192 (ip address of docker0)
However I cannot ping any container that I start. E.g. for container IP 192.168.2.226,
I get a reply from 192.168.2.2 (my PC address) that the Desitination Host is unreachable.
How can I get this to work?
I figured it out in the meantime:
On Windows 7, from an elevated cmd shell do:
route add 192.168.2.224/27 192.168.2.30
This way the IP packets find their way to the containers!

dnsmasq resolve DNS queries normally

I'm new to dnsmasq and networking isn't my strong point, hopefully i'm missing something simple.
I have a Ubuntu laptop running dnsmasq. The laptop's WiFi is connected to the Internet, the laptop's ethernet is connected to a LAN.
Plugging my machine into the LAN I am assigned an IP address by the laptop. Accessing www.google.com on my machine gets picked up the laptop and i'm served the laptops Apache page, which is my desired result. The problem is I can't access any other website, Destination Host Unreachable.
I'd like the laptop running dnsmasq to allow my machine to resolve DNS queries normally and only be restricted when accessing www.google.com.
My dnsmasq.conf is the default except:
address=/www.google.com/192.168.0.1
interface=eth0
dhcp-range=192.168.0.50,192.168.0.150,12h
I've a feeling it might be related to the IP settings on each network?
The WiFi has a static IP 192.168.1.55 taking to the router at 192.168.1.1 and the DNS server at 192.168.1.10.
The ethernet is configured manually with an IP 192.168.0.1 setting the router as the WiFi IP 192.168.1.55 and the same for the DNS server 192.168.1.55.
Thanks in advance for any help.
Pete
After a lot of fiddling, this was related to iptables and not dnsmasq.

Resources