Using static public IP with Virtualbox Linux VM

Discussions about using Linux guests in VirtualBox.
Post Reply
lucaLA01
Posts: 1
Joined: 20. Dec 2023, 00:00

Using static public IP with Virtualbox Linux VM

Post by lucaLA01 »

Dear all,

I need help configuring my system and I hope I can find it here.

This is the setup:
Windows 11 Pro host
Ubuntu guest OS

I have installed ubuntu with owncloud and I can reach it via local IP address.

Now. My ISP assigned me a pool of public IPs and I would like to use one to reach the VM with a server apache2 installed on it. The problem is I do not know how.

I have tried to setup the router with portforwarding
I have tried to use IP passthrough too

I cant gain access to the server using the public IP. Can anyone tell me what I have to do? thank you in advance.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Using static public IP with Virtualbox Linux VM

Post by scottgus1 »

You can only use certain of the Virtualbox network types to allow outside access to the VM OS. Bridged, NAT, and NAT Network are the types that can be used. Please see Virtualbox Networks: In Pictures for how they work.

In a nutshell, Bridged puts the VM on the LAN just like the host is, so the physical router and the VM can communicate directly. NAT and NAT Network put another "router" between the VM and the host, so you physical router has to talk to the host on a certain port, then Virtualbox can pick up traffic on that port and send it to the VM.

What kind of network is your VM set to use?
Post Reply