 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

13th July 2012, 11:28 AM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 57

|
|
|
Networking help with VirtualBox
I have Vista machine, on which i have installed Fedora 15 using VirtualBox. To access the internet using Fedora i have to change my network settings to NAT in VirtualBox. With bridged network i can access the LAN but cannot access the internet due to the restrictions placed on the router.
With NAT enabled i can access the internet and even ping the LAN , but my Vista machine cannot access or ping the Fedora VirtualBox.
Any advice how can i access both ways.
Ip on Fedora : 10.0.2.15/24
Ip on Vista : 192.168.0.220/24
|

13th July 2012, 01:31 PM
|
|
Registered User
|
|
Join Date: Aug 2010
Location: Al Ain, UAE
Posts: 1,045

|
|
|
Re: Networking help with VirtualBox
Configure them with the same subnet. If you have a router thingy that runs DHCP then use it for all machines.
|

13th July 2012, 01:54 PM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 57

|
|
|
Re: Networking help with VirtualBox
I don't have access to the router.
And when i change the setting to bridge in VirtualBox, the IP of fedora gets changed to
192.168.0.114/24 ( My LAN IP )
And when i choose NAT option , the IP is changed to
10.0.2.15/24
|

14th July 2012, 01:21 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Location: Pekin, Indiana
Posts: 78

|
|
|
Re: Networking help with VirtualBox
Quote:
Originally Posted by Azhar
I don't have access to the router.
And when i change the setting to bridge in VirtualBox, the IP of fedora gets changed to
192.168.0.114/24 ( My LAN IP )
And when i choose NAT option , the IP is changed to
10.0.2.15/24
|
Ok, so the router is assigning IPs from the 192.168.0 network, setup the fedora virtual machine to be bridged and then inside of fedora manually specify an IP and together with the netmask of 24 and the gateway address of the router.
You can find the gateway address you need from windows by running cmd and typing ipconfig /all then press enter.
|

14th July 2012, 07:48 AM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 57

|
|
|
Re: Networking help with VirtualBox
I don't understand how that will help me. I mean in bridged mode i already have an IP from 192.168.0 network and my router restricts access to the internet except to the IP's already assigned.
With NAT'ing i am ultimately using the IP that has been assigned to my machine but with NAT'ing i can't access my virtual machine from my physical.
|

14th July 2012, 08:50 AM
|
|
Registered User
|
|
Join Date: Jun 2009
Location: Alkmaar The Netherlands
Posts: 192

|
|
|
Re: Networking help with VirtualBox
Dear Azhar,
If you cannot allow your virtual IP to the internet due to router restrictions there is not much what you can do, I'm afraid. Can't you use NAT and do port forwarding in VirtualBox in order to have access to the services you want?
http://www.virtualbox.org/manual/ch06.html
Good luck!
__________________
H.Janssen
Alkmaar
The Netherlands
|

14th July 2012, 10:43 AM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 57

|
|
|
Re: Networking help with VirtualBox
So, if i understand you correct, i can use NAT and can access my virtual machine from host machine through port forwarding??
P.S I am configuring DNS on virtual machine and want my host machine to use the DNS services by the virtual machine.
|

14th July 2012, 12:21 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,975

|
|
|
Re: Networking help with VirtualBox
This is a feature to protect the virtual machine from attacks. If running NAT, the host can't access it.
However, if you add VirtualBox Guest additions, you can enable sharing between guest and host, even if guest is running NAT.
I've always had Windows guests on Linux hosts, and usually use samba, but if you click the help menu and then choose the search (or index, I forget which) and then search for shared folders, it should be pretty clear. You'll have to install Guest Additions on the Fedora guest, which will require having a few development packages.
http://www.sysprobs.com/install-fedo...irtual-machine
might be useful for that part.
|

14th July 2012, 04:16 PM
|
|
Registered User
|
|
Join Date: Jun 2009
Location: Alkmaar The Netherlands
Posts: 192

|
|
|
Re: Networking help with VirtualBox
Dear Azhar,
You should forward port UDP 53 and port TCP 53 from outside to inside the VM. With a Linux host,
you would have a problem in this case; because 53 is a privileged port, only the superuser is allowed to do this, but I do not know how a Windows hosts handles this.
Another option: If you have two solutions working halfway, just take both....
An ethernet card in a VM is free, you do not have to go to the shop and do not need cables, just define a second one in the virtual machine properties. One natted ethernet inteface, one bridged, and you get a natted eth0 for the internet and a bridget eth1 for your LAN exercises. Just take care that in the VM the default route and the name server point into the internet.
Good luck!
__________________
H.Janssen
Alkmaar
The Netherlands
|

14th July 2012, 07:50 PM
|
|
Registered User
|
|
Join Date: Apr 2010
Posts: 57

|
|
|
Re: Networking help with VirtualBox
hmmsjan, you da man.
Couldn't get the first option to work, i guess i wasn't able to make Host machine understand how to get to the other network.
The second option works perfectly fine. Second NIC idea was amazing. Thanks a lot.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 15:38 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|