How to make guest ubuntu server(apache,mysql) online

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ezard
Posts: 5
Joined: 20. May 2009, 21:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu

How to make guest ubuntu server(apache,mysql) online

Post by ezard »

Host: windows xp pro
guest: ubuntu server 9.04
i need to make it apache,mysql,email,news server online in internet,not just for the host server..
so how to do it?
bridge networking didnt work,heare..when i selec local network,and virtualbox network,and make the bridge i lost the connection with internet..
so what to do?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to make guest ubuntu server(apache,mysql) online

Post by Sasquatch »

Bridged is still what you need. Check your network settings again, are you sure that after a repair of your network adapter you still don't have internet? Updated the drivers for the NIC?
If that still fails, you need to use NAT and port forwarding, as described in the manual. I assume you don't need to access MySQL from the internet, so you only need to forward port 80, and perhaps 443 if you will be serving https to the outside.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
ezard
Posts: 5
Joined: 20. May 2009, 21:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu

Re: How to make guest ubuntu server(apache,mysql) online

Post by ezard »

so maybe im doing something wrong?
i select the local network(my internet connection) and the VirtualBox Host-Only Network,and then make bridge.
is that right?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to make guest ubuntu server(apache,mysql) online

Post by Sasquatch »

No, there is a nice option called Bridged. Select that, then select the NIC you use for internet in the VM settings. If you can't select a NIC, install VB again, select repair and the NIC should be available now. You don't have to 'bridge' anything else, VB does the rest.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
ezard
Posts: 5
Joined: 20. May 2009, 21:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu

Re: How to make guest ubuntu server(apache,mysql) online

Post by ezard »

Sasquatch wrote:No, there is a nice option called Bridged. Select that, then select the NIC you use for internet in the VM settings. If you can't select a NIC, install VB again, select repair and the NIC should be available now. You don't have to 'bridge' anything else, VB does the rest.
mode bridge selecting my internet nick dont worked too,the ubuntu server couldnt get the dhcp..even after repairing the network..
the drivers of my nic are the lastest..that bridge feature,just dont work.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to make guest ubuntu server(apache,mysql) online

Post by Sasquatch »

Is your PC connected to the internet directly, or is a router used? If you're connected directly, that's the problem. Your ISP only provides 1 IP address on your connection, which is already taken by the Host. Either use NAT with port forwarding, as described in the manual, or get a router. You would then still need to forward some ports on the router to the Guest, so using NAT might be faster.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
ezard
Posts: 5
Joined: 20. May 2009, 21:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu

Re: How to make guest ubuntu server(apache,mysql) online

Post by ezard »

1)i have a d-link wireless route that i dont use heare..if i put it on..and select bridge it will work?
2)how to redirect port http/ssh/smtp/ftp to the guest using nat redirection?
3)if i run a local dhcp server on my windows xp,it can help? what i need to edit?
Sasquatch wrote:Is your PC connected to the internet directly, or is a router used? If you're connected directly, that's the problem. Your ISP only provides 1 IP address on your connection, which is already taken by the Host. Either use NAT with port forwarding, as described in the manual, or get a router. You would then still need to forward some ports on the router to the Guest, so using NAT might be faster.
Last edited by ezard on 22. May 2009, 16:22, edited 1 time in total.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to make guest ubuntu server(apache,mysql) online

Post by Sasquatch »

ezard wrote:1)i have a d-link wireless route that i dont use heare..if i put it on..and select bridge it will work?
2)how to redirect port http/ssh/smtp/ftp to the guest using nat redirection?
I hate it to repeat myself:
If that still fails, you need to use NAT and port forwarding, as described in the manual.
Having a router between your PC and internet will make it work, because your Guest will be able to obtain an IP address. As I said before, you still need to forward the ports in the router, like you would when the Guest uses NAT. Again, I'm repeating myself here, and I really, really don't like that.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
ezard
Posts: 5
Joined: 20. May 2009, 21:11
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu

Re: How to make guest ubuntu server(apache,mysql) online

Post by ezard »

i found a free dhcp server for windows..
if i instal it,and run it heare..it can help? if so,what i need to change in the nic that i select?
ok so i did this.
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222


VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestftp/Protocol" TCP
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestftp/GuestPort" 21
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestftp/HostPort" 2221

VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/Protocol" TCP
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/GuestPort" 80
VBoxManage setextradata "ubuntu" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/HostPort" 2280

at first look no errors appeared,im going to test it now..lets see
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to make guest ubuntu server(apache,mysql) online

Post by Sasquatch »

Dude, get a book about networking and read it first, before installing things you don't even need. It looks to me you have no idea how networking works, or how to set up a network between two computers.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply