Pinging from virtual machine to raspberry - networking

I have the following setup: A virtual machine, started with qemu is running on an ubuntu laptop. I also have a raspberry pi 4 booted from a sd card connected over ethernet with the laptop. My goal is to establish a network connection between the VM and the Raspberry. So far i worked with a tap (tap0) and a bridge (br0) to connect the VM with my network adapter (eth0).
I was expecting that The VM and the raspberry should now be able to ping each other but i can only do the following:
Ping from VM to bridge
Ping from Raspberry to bridge
Ping from bridge to Raspberry or VM
Where could the problem be?

I found the problem. It was the firewall! Make sure to enable ip forwarding here.
sudo iptables -P FORWARD ACCEPT
if you are in a closed network as in my case this shouldn't be a problem.

Related

VMWare, Cannot ping Linux guest from Windows 10 host over bridged connection

I'm running VMWare player 16 on a Windows 10 machine. I have a VM running Ubuntu and using a bridged connection on WiFi adapter. I can ping the Ubuntu guest from other PCs in the network but I cannot ping it from the Windows 10 host machine.
In the past I got a problem like this and I didn't find a suitable answer in the internet or VMWare support. At the end the problem was related to a filter that was enabled on the WiFi adapter. The filter was named "LiveQoS NDIS 6 Filter Driver", after disabling it in the network adapter properties of the windows host, the ping to the guest started to work again.

Can not SSH or PING RasPi3B+ IP address

I have a Raspberry Pi 3B+ which I have to admit has only recently shown this problem.
I booted up the Pi normally and tried to SSH into it since I have a static IP set for it. This was unsuccesful, so I connected my monitor and keyboard, and run ifconfig to see the current IP address. After checking to see if my laptop is connected to the same WiFi network as the Pi, I tried SSH-ing into the Pi with no success: sh: connect to host xxx.xxx.xxx.xxx port 22: Connection timed out or Reply from xxx.xxx.xxx.xxx: Destination host unreachable..
My Pi has the SSH interface option enabled and can use it's internet connectivity as I could PING www.google.com with success and can also run sudo apt update && sudo apt upgrade.
I tried rebooting thinking this is a power issue, using a different socket / charger, restarting dhcpcd.service. No success, so I got curious.
I have connected a WiFi dongle onto the Pi, enabling the wlan1 interface which immediately discovered and connected to the WiFi network (it is an open network) and was assigned an IP. SSH=ing into this IP was successful. How can I fix my wlan0 interface? I do not want to rely on an external dongle. Connecting an ethernet cable and SSH-ing using the eth0 interface works as well.
I ended up reflashing my RaspberryPi with a fresh install

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

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.

LCM UDP Message Through Shared Network

Folks,
I have a Ubuntu machine connected to the Internet through wireless (wlan0), and I am sharing this connection to my Ethernet port (eth1). Then, I have this Ethernet port connected to a switch, and two windows machine connected to the same switch. So the two windows machines have a static IP from the LAN generated from the route generated from wlan0 to eth1, so that I can communicate with all 3 computers at the same time (this works since I can ssh and remote access all 3 computers).
My problem is that I when I run my LCM program (with TTL = 1) on my windows PC, I cannot receive the messages on my Ubuntu machine (meaning that the message should pass through the Ethernet). How can I make sure the UDP messages can be routed back into my Ubuntu machine from the windows machines while the wireless network is running?
This was my solution to the problem (right there on the LCM website):
sudo ifconfig eth1 multicast
sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth1
Now all my UDP packets are routed only through eth1. And my shared network (from wlan0) is still intact after this. So all computers have internet at the same time. So great!

How to connect docker in VM of VMware Player

I create a VM in win7 host. The net mode is NAT, and IP of VMware Virtual Ethernet is 192.168.169.1. The VM (its OS is debian) can connect the host by eth0. Win7 can connect VM, too.
Than I create docker in VM. The net mode is bridge, and IP of bridge Ethernet (docker0) is 172.17.0.1. the ip of eth0 in docker is 172.17.0.2. And VM can ping to docker. docker can ping to VM, too.
But win7 host can not ping to docker. How can I connect docker in host?

Resources