Jump to content

Help with some basic port forwarding from a vm(virtualbox)

thenormalguy134

Hi. I need help accsessing a webserver wich is hosted in my vm, so i can use the server from my web browser outside of the vm. I found some instructions but i dont quite understand the because im a newbie at this

i Just need help understanding them.聽

image.png.fad73e1b6ffe092681c404850728a682.png

Thanks 馃檪

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, thenormalguy134 said:

Hi. I need help accsessing a webserver wich is hosted in my vm, so i can use the server from my web browser outside of the vm. I found some instructions but i dont quite understand the because im a newbie at this

i Just need help understanding them.聽

image.png.fad73e1b6ffe092681c404850728a682.png

Thanks 馃檪

are you using internal NAT or regular network inside your network in your virtual box?..聽

it's not need to port forward if you use regular network on the vm's..聽 just open the ports in the internal firewall.聽

or do you want to access it from outside your network.. port forwarding is done in your local router/firewall then.聽 AND since external ip will change unless you have static IP... most don't. you'll need to check that every few weeks to have the correct IP.聽

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Robchil said:

are you using internal NAT or regular network inside your network in your virtual box?..聽

it's not need to port forward if you use regular network on the vm's..聽 just open the ports in the internal firewall.聽

I dont know. im a newbie at this. Sorry. How can i tell?

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Robchil said:

are you using internal NAT or regular network inside your network in your virtual box?..聽

it's not need to port forward if you use regular network on the vm's..聽 just open the ports in the internal firewall.聽

or do you want to access it from outside your network.. port forwarding is done in your local router/firewall then.聽 AND since external ip will change unless you have static IP... most don't. you'll need to check that every few weeks to have the correct IP.聽

how do i open the correct ports from the internal firewall? this is a web server running in the vm, its for controlling a 3d printer and i would like to acsess it from my main computer wich is the computer im hosting the vm on.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, thenormalguy134 said:

I dont know. im a newbie at this. Sorry.

i havn't used virtual box for ages.. just wmware workstation.. and in network settings you can select use network IP's or NAT with internal IP's..聽 so your vm's will have their own IP range.聽

unless it's in an office environment there is usually no use using NAT..聽

you will need to check your router/firewall on what IP's are free to use in the dhcp.. or just use DHCP on the nic on the vm to get local IP, and set it as dedicated.聽

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, thenormalguy134 said:

how do i open the correct ports from the internal firewall?

... easiest... turn the firewall off on the vm.. 馃檪聽atleast to test

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Robchil said:

... easiest... turn the firewall off on the vm.. 馃檪聽atleast to test

no. the vm needs internet for the webserver to function. Software updates and stuff. i just want you to help me understand the instructions given to me so i can plot the correct numbers into this window:

image.thumb.png.d43acf7cbc859dbb4e8bd5e27019d49f.png

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, thenormalguy134 said:

no. the vm needs internet for the webserver to function. Software updates and stuff. i just want you to help me understand the instructions given to me so i can plot the correct numbers into this window:

image.thumb.png.d43acf7cbc859dbb4e8bd5e27019d49f.png

your router is already a firewall and also NAT'ing (network adress translation) from public IP to your internal IP.. generaly in a local private network you don't need the firewall on unless someone hacks your local network and that's most likely not happening.聽

127.0.0.1 is the internal loopback adapter.. on any pc you can go to 127.0.0.1 and end up at your pc's webserver..聽

if your local network adress range is 10.0.2.x you should not need that at all.. just add the ip to your local hosts file... or add it in the DNS of your firewall/router.聽

since it's a port 80 it's not secure so if you type http://10.0.2.15 in your browser you should be able to access it.聽

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, Robchil said:

your router is already a firewall and also NAT'ing (network adress translation) from public IP to your internal IP.. generaly in a local private network you don't need the firewall on unless someone hacks your local network and that's most likely not happening.聽

127.0.0.1 is the internal loopback adapter.. on any pc you can go to 127.0.0.1 and end up at your pc's webserver..聽

if your local network adress range is 10.0.2.x you should not need that at all.. just add the ip to your local hosts file... or add it in the DNS of your firewall/router.聽

since it's a port 80 it's not secure so if you type http://10.0.2.15 in your browser you should be able to access it.聽

generaly in a local private network you don't need the firewall on unless someone hacks your local network and that's most likely not happening.聽

im not messing with my firewall. sorry. but i dont know what to do if something goes wrong. and since i dont actuially need to. then im not gonna.

127.0.0.1 is the internal loopback adapter.. on any pc you can go to 127.0.0.1 and end up at your pc's webserver..聽

if your local network adress range is 10.0.2.x you should not need that at all.. just add the ip to your local hosts file... or add it in the DNS of your firewall/router.聽

what does this mean? add ip to local host file? explain?

since it's a port 80 it's not secure so if you type http://10.0.2.15 in your browser you should be able to access it.聽

yes. i can acsess it from my browser. thats the fluidd window you can see in the background. But thats on my vm. i want to acsess that ip outside of my vm from my browser on the host computer.

my guy. im sorry to say this but you are not explaining anything. you are basicly saying to me: Drive to the store and buy some milk. but the problem is i cant drive.

if you want me to do something, then you are going to have to explain how to do that thing.聽

im sorry for saying this but i dont understand you.

Link to comment
Share on other sites

Link to post
Share on other sites

53 minutes ago, thenormalguy134 said:

Hi. I need help accsessing a webserver wich is hosted in my vm, so i can use the server from my web browser outside of the vm. I found some instructions but i dont quite understand the because im a newbie at this

i Just need help understanding them.聽

image.png.fad73e1b6ffe092681c404850728a682.png

Thanks 馃檪

I'd first change the network adapter of the VM to use the bridged connection so it appears on your local network, not the default nat configuration.

Then you need to port foward the VM to the rest of the internet. This is the same process as port forwarding any other computer on your network.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Electronics Wizardy said:

I'd first change the network adapter of the VM to use the bridged connection so it appears on your local network, not the default nat configuration.

Then you need to port foward the VM to the rest of the internet. This is the same process as port forwarding any other computer on your network.

ok. i have bridged the connection. i think. how do i port forward? i dont know how to do it.image.png.b24a1b12afc687c22a69412a629d4599.png

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, Electronics Wizardy said:

I'd first change the network adapter of the VM to use the bridged connection so it appears on your local network, not the default nat configuration.

Then you need to port foward the VM to the rest of the internet. This is the same process as port forwarding any other computer on your network.

here maybe?聽image.png.041a9889812f230a6a1f08a87dc53d3f.png

Link to comment
Share on other sites

Link to post
Share on other sites

21 minutes ago, thenormalguy134 said:

here maybe?聽image.png.041a9889812f230a6a1f08a87dc53d3f.png

Yup thats right. Then you should be able to access by other system on your lan. Is that correct?

Then port forward on your router.

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Electronics Wizardy said:

Yup thats right. Then you should be able to access by other system on your lan. Is that correct?

Then port forward on your router.

no. i cant acsess the server when i eneble this setting. not on the vm. not on my pc. and how do i port forward? like how do i plot in the correct numbers for it to work and where do i find these numbers?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, thenormalguy134 said:

no. i cant acsess the server when i eneble this setting. not on the vm. not on my pc. and how do i port forward? like how do i plot in the correct numbers for it to work and where do i find these numbers?

Can you access it with other PCs on your local network? Sometimes the bridges connections don't allow connections from the host to a vm.

You have to port forward on your router.聽

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Electronics Wizardy said:

You have to port forward on your router.聽

ok. look. i dont know how to port forward. sure. i can find the menu. But i dont know what the port forwarding options does. so if you tell me i have to port forward, then idk how , you are going to have to tell me.

i rent an apartment, so i dont have acsess to the router settings because it requires a password and username wich im not getting.

i gave you insttructions in the original post. can you just help me to find out what numbers i need to input in the port forwarding window in virtual box from the instructions?

and if its not that simple. then tell me

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, thenormalguy134 said:

ok. look. i dont know how to port forward. sure. i can find the menu. But i dont know what the port forwarding options does. so if you tell me i have to port forward, then idk how , you are going to have to tell me.

i rent an apartment, so i dont have acsess to the router settings because it requires a password and username wich im not getting.

i gave you insttructions in the original post. can you just help me to find out what numbers i need to input in the port forwarding window in virtual box from the instructions?

and if its not that simple. then tell me

Your gonna need that username and password to access the router to port forward.

Since you setup the network as bridged in virtual box you don't need to port forward there.聽

If you can't access the router, your likely better off hosting in a cloud host for this use case.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Electronics Wizardy said:

Your gonna need that username and password to access the router to port forward.

Since you setup the network as bridged in virtual box you don't need to port forward there.聽

If you can't access the router, your likely better off hosting in a cloud host for this use case.

hosting in a cloud is pysicaly impossible since i need a low latency usb serial connection.聽

ima keep this simple.聽

the instructions is for the exact thing im trying to do, he did it, i can do it.聽

in the instructions there are numbers. ip adresses and ports wich needs to be plottet into a window. the virtual box port forwarding window. can you tell me what number from the instruction needs to go where in the port forwarding window. my ip adresses and port are the exact same as shown in the instructions.

image.png.fad73e1b6ffe092681c404850728a682.png

image.thumb.png.d43acf7cbc859dbb4e8bd5e27019d49f.png

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, thenormalguy134 said:

hosting in a cloud is pysicaly impossible since i need a low latency usb serial connection.聽

ima keep this simple.聽

the instructions is for the exact thing im trying to do, he did it, i can do it.聽

in the instructions there are numbers. ip adresses and ports wich needs to be plottet into a window. the virtual box port forwarding window. can you tell me what number from the instruction needs to go where in the port forwarding window. my ip adresses and port are the exact same as shown in the instructions.

image.png.fad73e1b6ffe092681c404850728a682.png

image.thumb.png.d43acf7cbc859dbb4e8bd5e27019d49f.png

What is your goal here? Is it to access this externally?聽

If you want to access externally, you need to configure the router.

If you want to access on your local network, setting it to briged will let you do that. I don't see the point in port forwarding here.

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Electronics Wizardy said:

What is your goal here? Is it to access this externally?聽

If you want to access externally, you need to configure the router.

If you want to access on your local network, setting it to briged will let you do that. I don't see the point in port forwarding here.

the point is that using a bridged connection doesnt work or im doing something wrong. i only want to acsess the webserver from my local network. i dont get it. why cant you tell me what to input in the port forwarding window.

from what i know. and i might be wrong. port forwarding is just raising the level of acsess. example. from local network to external network(internet)

so it would make perfect sense that the port forwarding options in virtual box goes from the vm to the internal network.

or am i wrong.聽

can you just please tell me what i need to do from the instructions?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, thenormalguy134 said:

the point is that using a bridged connection doesnt work or im doing something wrong. i only want to acsess the webserver from my local network. i dont get it. why cant you tell me what to input in the port forwarding window.

from what i know. and i might be wrong. port forwarding is just raising the level of acsess. example. from local network to external network(internet)

so it would make perfect sense that the port forwarding options in virtual box goes from the vm to the internal network.

or am i wrong.聽

can you just please tell me what i need to do from the instructions?

If you want to access it on your local network, bridging the connection should be a lot easier. Can you ping the vm?

But port forwarding will work fine here. Put in the IP of the guest in the guest port, port 80 in both of the port boxes, and the host ip address you want to listen on(ip of your dkestop

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Electronics Wizardy said:

If you want to access it on your local network, bridging the connection should be a lot easier. Can you ping the vm?

But port forwarding will work fine here. Put in the IP of the guest in the guest port, port 80 in both of the port boxes, and the host ip address you want to listen on(ip of your dkestop

why do i loose connection with the webserver when i eneble bridging?聽 and no. i cant ping the vm

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, thenormalguy134 said:

why do i loose connection with the webserver when i eneble bridging?聽 and no. i cant ping the vm

because you stop NAT'ing and your webserver will receive it's own local IP adress..聽 on the VM check the network adapter.聽

or just ping and check if 10.0.2.16 replies.. it will probably just get the next free adress.聽 and enter that into your web browser.. http://10.0.2.16

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now