I have an Ubuntu guest installed in VirtualBox with two virtual network adapters : Internal network adapter + Bridged Adapter. The bridged adapter is using DHCP for connectivity configuration and works well. The internal network adapter is configured manually so i can simulate a cross cable connection with another Ubuntu guest and also works well. The internal network adapter has this configuration :
IP : 192.168.1.100 MASC : 255.255.255.0 GW : -- DNS : --
My router is providing to the bridged adapter an IP in the range 192.168.1.0/24 (actually it has 192.168.1.37). I am using Virtualbox on windows and I have two Ubuntu guests and I want to be able to ping from the bridged adapter to the internal network adapter and viceversa on the same virtual machine because right now I can not do it (I can not ping eth0 from eth1 or the opposite). Basically I want to establish my Bridged adapter IP as the internal networks adapter gateway so any traffic coming from my internal network (the other ubuntu guest) through the internal network adapter can reach internet. Here is my complete scenario :
Windows Host <--- Bridged Connection ----> Ubuntu Guest 1 <---- Internal network ---> Ubuntu Guest 2
My "Ubuntu guest 1" can access internet through the bridged adapter correctly. Between "Ubuntu Guest 1" and "Ubuntu Guest 2" I can ping in both directions and captures traffic in Wireshark through the internal network adapters that both VMs have. I am only missing the interconnection between the adapters in my "Ubuntu guest 1" as explained.