Home Network Host website from Ubuntu Desktop VM

19lawrence83

New Member
Oct 3, 2021
4
0
1
41
Hello,

I'm trying to learn how to host a website from a virtual machine. I currently have a pfsense dedicated computer that runs my routing / firewall. Connected to that is a managed switch with no additional configurations currently. Connected to that is a rack server 2U Proliant G8 with ProxMox installed. Inside Proxmox I have multiple VMs i've installed but in particular a Ubuntu Desktop that is running Nginx as a rev proxy for a .net core API with a swagger ui.

I've contacted my ISP and made the modem into a pure modem instead of a modem / router.

I've configured PFSense to forward my Public IP to 192.168.19.99 which is the Ubuntu server.

My ubuntu desktop VM can open the browser and use the internet. On my desktop i can open a browser and enter 192.168.19.99/api/employee and reach the swagger page.

If I type <my.public.ip>/api/employee , all i get is This site can't be reached.

I have tried https://forum.proxmox.com/threads/how-to-port-forward-to-a-vm-on-proxmox-4-2.28732/ solution but it doesnt seem to do anything.

Any advice would be much appreciated. If you need further detail please let me know what you need.

Thanks,
 
hi,

My ubuntu desktop VM can open the browser and use the internet. On my desktop i can open a browser and enter 192.168.19.99/api/employee and reach the swagger page.

If I type <my.public.ip>/api/employee , all i get is This site can't be reached.
on your pfsense you have to open a port for incoming connections, and forward traffic the coming there to the corresponding port of your ubuntu VM where the nginx is running.

for example:
(public IP) 1.2.3.4:8000 -> (local IP) 192.168.19.99:80

then you should be able to reach your page by visiting http://1.2.3.4:8000
 
hi,


on your pfsense you have to open a port for incoming connections, and forward traffic the coming there to the corresponding port of your ubuntu VM where the nginx is running.

for example:
(public IP) 1.2.3.4:8000 -> (local IP) 192.168.19.99:80

then you should be able to reach your page by visiting http://1.2.3.4:8000

Hello,

Thank you so much for responding. I'm not quite sure what you mean open a port for incoming connections. I do have these two setting on my pfSense.
NAT PortForward
https://ibb.co/g3TN4GH

Wan-Firewall Rule
https://ibb.co/yP7GLrH

Is there something else I need to do?

Thanks,
Lawrence
 
. I do have these two setting on my pfSense.
those settings look fine.

you will also need to allow incoming port 80 to your firewall IP (public IP address), so that you can reach the port from outside your local network.
 
I GOT IT WORKING!!! YAY, the setting was actually NAT Reflection. I had tried this once but it didnt work but when i tried again it worked.
Here are those setting in PFSense if it may help others.
https://ibb.co/bK67wDb

These are found in Advanced > Firewall & NAT. Scroll down and you will see the section in the list.


Thanks to everyone that helped me with this.
 
great! :)

you can mark this [SOLVED] by editing the thread prefix so that others also know what to expect
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!