Link to home
Start Free TrialLog in
Avatar of PCANW
PCANW

asked on

network between multiple VirtualBox machines for my Mac

Hello
how can I connect the internet to the client machine in VM?
I am trying out to connect between two machines. the fedora  virtual machine which is the server and the ubuntu virtual machine which is the client.
the server has two adapters one is NAT and the another is internet network.
the client has one adapter that is internet network. Both has the same name of internet network in the adapter.

I am using Mac host mashine
Mac Ip 10.0.1.39

Fiest, Fedora virtual machine is connecting to the internet by using NAT:
ip 10.0.2.15/24
route 10.0.2.2
DNS 10.0.1.1
and in anther adapter using internet network has
ip 10.10.10.110/24
route 10.0.2.15
DNS 10.0.1.1

Ubuntu virtual machine
in adapter using internet network has
ip 10.10.10.112/24
route 10.10.10.110
DNS 10.0.1.1

it is pining between each virtual machines. fedora can connect to the internet but Ubuntu doesn't connect to the internet.
Can anyone help me out here?
how can I connect ubuntu as a client to the internet through using fedora as a server?
Thanks
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

use Bridged Networking Mode for ALL VMs.
Avatar of PCANW
PCANW

ASKER

I changed that and lost the internet on fedora VM.  fedora got a new ip 10.0.1.29 but doesn't connect to the internet :(
IF Fedora got a new IP Address, that was from your DHCP server on you main LAN.

can you ping 158.152.1.222 ?
Avatar of PCANW

ASKER

No I can't ping from fedora to that ip address. yes i know it got the ip address from DHCP. here I want to use fedora as server and gives anther VM internet....
how was the fedora VM accessing the internet before?

do you use different IP Address and default gateway, than DHCP server gives out?
Avatar of PCANW

ASKER

fedora accessed the internet when it used NAT adapter. no it is not different because it got it automatic DHCP.
if it was using NAT it would received an IP Address DHCP from the NAT services, which then uses the Host networking to reach the internet.

Does the Host computer receive it's IP address from your LAN DHCP server, or does it use different IP address details than your DHCP server on your LAN
Avatar of PCANW

ASKER

the host computer connects and receive the ip address from a wireless access point  (WLAN). it doesn't use different ip address. on Bridged Networking Mode used Wi-Fi.
so the IP Address received by the Fedora PC, is in the same sub network, as the host, when using Bridged Mode?
Avatar of PCANW

ASKER

yes the same sub network as the host...
Avatar of PCANW

ASKER

Do i have to use USB Wireless adapters/ card for Bridged Mode?
Avatar of PCANW

ASKER

I meant different USB Wireless adapters/ card for Bridged
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PCANW

ASKER

first, I really appreciate that!! thanks! that's true. now what should i do?
if you are using a WiFI device this behaviour is to be expected.
Avatar of PCANW

ASKER

Hello
NowI have extra a wireless card for VirtualBox.  I changed the ip addresses I have some problems and I have mansion here
On VirtualBox, there is 2 OS. One is a fedora server and another is an Ubuntu client.
Fedora has 2 NIC one is external wireless, another is as Ethernet which is internal: adapter to internal network and Promiscuous mode allow all  
From fedora: When I ping to the client, it is pinging but when I ping to yahoo.com it don’t ping shows me “Destination Host Unreachable”
However when I disable the internal card, it is pinging to yahoo.com

I changed the file sysctl.conf as net.ipv4.ip_forward=1
# iptables -A FORWARD -i eth1 -j ACCEPT
# iptables -A FORWARD -o eth1 -j ACCEPT

Fedora
External ip 10.0.1.30/24
DNS & Getway 10.0.1.1
Internal ip 192.168.1.1/24
Getway 10.0.1.30
Clinet 192.168.1.2/24 getway 192.168.1.2
Please any idea.
Avatar of PCANW

ASKER

I've requested that this question be deleted for the following reason:

I wanna write the same question and make it more clear because no one responded