I have two virtual box VMs. U1 and U2
VM U1 has two adapters, enp0s3 which is bridged to my wireless adapter on my host machine and enp0s8 which is connected to internal network named "inet". Additionally I am also running a dhcp server on enp0s8 interface. I also configure static ip address for U1's enp0s8 interface using /etc/network/interfaces file
VM U2 has one adapter, enp0s3 which is connected to internal network named "inet".
Now when I spin up U1 and then U2 and do
ping <u1_enp0s8_ip_address>
from U2 I get a reply back
However when I try
ping <u1_enp0s3_ip_address>
from U2, there is no response
Also I have tried
ping -I enp0s8 <u1_enp0s3_ip_address>
in U1, and there is no response.
What do I need to do so that enp0s8 on U1 can communicate with enp0s3 on U1?
Any suggestions/replies will be highly appreciated. I have been stuck on this for a couple of days now.
(EDIT 1)
Output from sudo iptables -L
command
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
(EDIT 2)
sudo iptables -L
command output
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
(Edit 3)
Output from route -n
command
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 enp0s3
10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s8
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s8
192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
enp0s3's (external network interface) network is 192.168.0.0/24 and enp0s8's (internal network interface) network is 10.0.1.0/24
Output from sysctl net.ipv4.ip_forward
command
sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
Regards