Page 1 of 1
How to make guest ubuntu server(apache,mysql) online
Posted: 20. May 2009, 21:14
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?
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 20. May 2009, 22:08
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.
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 21. May 2009, 00:09
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?
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 21. May 2009, 11:51
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.
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 22. May 2009, 12:26
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.
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 22. May 2009, 12:57
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.
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 22. May 2009, 16:14
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.
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 22. May 2009, 16:20
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.
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 22. May 2009, 16:24
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
Re: How to make guest ubuntu server(apache,mysql) online
Posted: 22. May 2009, 17:06
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.