Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've installed Ubuntu (both desktop and server, newest releases) on VirtualBox virtual machines.

They are working, all services is running (apache2, mysql, php, xrdp, ssh...), i can even open apache2 default page in feuerfox on desktop system's localhost.

But then i trying to access it via lan between VM and host-machine.

And apache2 page doesn't opening, mysql and rpd clients can't connect and even ssh connection "refused".

When installing, ethernet interface is automatically configured for DHCP (as i use VirtualBox's NAT to access internet for installing optional packages), but then i changing configuration to static LAN IP's so VM and host can ping each other.

Firewall deactivated, but it doesn't help.

WDIDW?

UPDATE [ROARING INCREDIBLY LOUD]

Found it by myself.

Problem was just that i used static network 192.168.1.0 on interface to VM, when the same network was assigned to other interface to DSL modem by it's DHCP. So VM/HOST was 192.168.1.2/192.168.1.1 and host/DSL was the same 192.168.1.2/192.168.1.1.

ALMOST A WEEK, ALMOST A WEEK!!!111oneone

See after your NICs, lads.

share|improve this question

migrated from stackoverflow.com Nov 6 '12 at 15:37

This question came from our site for professional and enthusiast programmers.

1  
IIRC you cannot access NATed VM from outside... you can just setup portforwarding for specific ports/services –  Kamil Šrot Nov 2 '12 at 20:42
    
I've changed interface configuration to static, 192.168.1.2/24 with 192.168.1.1 as gateway (that's my host), so they can ping each other. –  yaapelsinko Nov 2 '12 at 20:47
    
Why not keep it nat and just forward ports? –  Jonathan Rowny Nov 2 '12 at 20:51
1  
This might help: askubuntu.com/questions/52147/… –  Nikos C. Nov 2 '12 at 20:54
    
Didn't help. This is common settings, which i always do, and, for example, with ClearOS 5.2 server it works. But, as far as i can figure it out, problem in accessing server at all. None of it's services i can access through lan, although all services are up and hosts can ping each other. –  yaapelsinko Nov 2 '12 at 22:05

1 Answer 1

You need to ensure that the host machine running virtualbox is bridging the traffic intended for your virtualbox properly.

share|improve this answer
    
i've created VM servers using ClearOS for example, and haven't problems connecting it outside. I think, if i can ping VM (and i can), the network is working properly? –  yaapelsinko Nov 2 '12 at 21:55
    
That depends. If you're pinging from the host machine, then that only means that the VMs network between it and the host is functioning. Whether the host is actually bridging between its LAN and the VM is an entirely different question. –  Jarmund Nov 3 '12 at 1:10
    
Weeeell i don't know exactly, but i used that configuration (connecting VM to host's virtual adapter, with static IPs) many times, and it always worked fine. So i don't expect problems from this side. –  yaapelsinko Nov 3 '12 at 3:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.