I have set up a yaml file in folder '/etc/netplan' following the template:
network: version: 2 ethernets: eth0: dhcp4: false addresses: - my public ip from 'curl ipinfo.io/ip' gateway4: my gateway ip from 'ip route | grep default', e.g. it is 192.168.1.1 for log "default via 192.168.1.1 dev eth0" nameservers: addresses: - 8.8.8.8 - 8.8.4.4
Also, I have set my nginx as
server { listen 80; server_name my_public_ip; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }}
I am sure my FastAPI server (hosted with Gunicorn and Nginx) works when I change the "my_public_ip" to the private IP address ('192.168.50.136') shown in VM summary page of the Proxmox UI.
I am still not able to send a request to my running server "my_public_ip_addr:80" ;_;
This is the summary of my Ubuntu 24.04 Server Virtual Machine
Proxmox Setting ImageThe first IP is my public ip from 'curl ipinfo.io/ip'.
Do I need to create another Network -> Linux Bridge? e.g. another CIDR, Gateway etc...
I am new to this, can anyone please help? Thank you!
I didnt setup ufw firwall
sudo ufw statusStatus: inactive