LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Virtual box using wan ip insteal of 10.0.0.1 (https://www.linuxquestions.org/questions/linux-networking-3/virtual-box-using-wan-ip-insteal-of-10-0-0-1-a-751348/)

yessirsir 08-30-2009 06:41 PM

Virtual box using wan ip insteal of 10.0.0.1
 
hello all,


i have ubuntu 9.04 installed on a dell laptop and it is running xp in the virtual box 3.0

everthing works fines except i would like to make the ip in the virtual box as WAN (it is already in ubuntu...ex : 70.xxx.xx.xx)

so i also wanna use that 70.xxx.xx.xx in the xp virtual box machine but now its 10.0.0.1

is there a not so hard way to do it ? im kinda new to this so please make an answer as newb proof as possible

so far i have tried the host only adapter option and internal network option , but i only ended up cutting my virtual box off the net


i appreciate the help

evilted 08-31-2009 12:27 AM

im not really sure why you would want to do this, but the answer is you can, perseverance! if i understand you correctly, you would like your public ip on an interface in a virtual machine? well, as long as youve setup your vm's interfaces to bridge with the host, and your virtual machine does nat there shouldnt be any problems (except for the increased traffic over the bridge)...

catkin 08-31-2009 01:59 AM

Configure the VM's network adapter as Bridged and configure the required IP address in Windows. This does not use NAT on the host; VBox switches the host's network adapter to promiscuous mode when the VM starts and any packets for the VM's IP are passed to the VM.

yessirsir 08-31-2009 12:30 PM

3 Attachment(s)
So i tried to do as mentioned by you guys, at first "blindly" with only what seemed right according to what you said but i guess i don't know what i am doing cause i only ended up crashing my VM as soon as i go in "my network connection"

now i am using a wired connection but i also could do wireless if required.


i played around with the Vbox settings after putting one adapter to NAT and one to bridge ... first adapter enabled, fast II , fast III, cable plugged or unplugged..etc, but doesnt work

the internet only works when i put the settings as shown in the images attached

is it the the VM settings AND in windows that i need to setup the bridge ?

in windows i need to network connection to do bridge right ? so one linked to the host and one acting as a bridge, then config the bridge ip to WAN... why cant i just use the connection that is linked to the host only instead of bridging ?

wow this supposed to be simple ? can one of you guys tell me how to set that up cause i checked guides too

(like this)
https://help.ubuntu.com/9.04/serverg...iguration.html

but i dont get it .

catkin 08-31-2009 01:02 PM

Quote:

Originally Posted by yessirsir (Post 3664191)
So i tried to do as mentioned by you guys, at first "blindly" with only what seemed right according to what you said but i guess i don't know what i am doing cause i only ended up crashing my VM as soon as i go in "my network connection"

now i am using a wired connection but i also could do wireless if required.


i played around with the Vbox settings after putting one adapter to NAT and one to bridge ... first adapter enabled, fast II , fast III, cable plugged or unplugged..etc, but doesnt work

the internet only works when i put the settings as shown in the images attached

is it the the VM settings AND in windows that i need to setup the bridge ?

in windows i need to network connection to do bridge right ? so one linked to the host and one acting as a bridge, then config the bridge ip to WAN... why cant i just use the connection that is linked to the host only instead of bridging ?

wow this supposed to be simple ? can one of you guys tell me how to set that up cause i checked guides too

(like this)
https://help.ubuntu.com/9.04/serverg...iguration.html

but i dont get it .

Sorry it has been so painful for you.

Which version of VirtualBox 3.0 are you using? Like many new versions, 3.0 introduced new features and new bugs. If you need the new features of 3.0 then do ensure you are using the latest release; if stability is more of a priority for you then better go with the last 2.x release for now. That said, I'm running 3.0.4 and its good enough for everyday use but occasionally networking doesn't work in which case I shut down the VM and restart it.

An early 3.0 workaround for bridged mode not working is to configure the first network adapter in bridged mode and the second network adapter in Host-only mode. You don't need to use the second network adapter in the guest OS; it just has to be there. Might be worth trying.

Regards the settings shown in the screen-shots (very nice, thank you) they effectively use the host like a NATting router. They will allow the guest to initiate connections to the network but do not allow the host to have its own IP address on whatever network the host is on.

The guest OS doesn't need to know anything about the bridge. As far as it is concerned it has an ordinary network adapter that appears to be wired to a network; the only configuration you need to do on the guest OS is to configure the IP address, netmask, default gateway and DNS servers -- or configure it to use DHCP to get the same.

Regards configuring bridging in ubuntu 9.04, it is not necessary since early VirtualBox 2.x. VirtualBox software running on the host does it all for you.

Probably better to use the VirtualBox default network adapter type (PC-net FAST III) because this is the one most used and so best tested. And you certainly need the virtual cable plugged in!

Good luck!

yessirsir 08-31-2009 05:51 PM

ok i am going to try that and i just might revert to previous version as you suggested too, cause yeah, i am on 3.0 now but i guess i dont need it since my main purpose of my VM is networking. so since it's not as stable then ... better to go back to 2.x

but thanks a lot for this very helpful post, it definitely makes things clearer for me. ill will go and try it now.


All times are GMT -5. The time now is 09:35 AM.