hello all. As a developer by trade, I decided to try my luck with setting up a small home virtualization lab using an old laptop as my proxmox host. My physical network setup currently is proxmox host connected to main PC directly via ethernet, main PC has wifi connection.
So far I have successfully configured proxmox and am able to reach the proxmox admin console web gui from my main pc. I have spun up a Turnkey Linux VM and have reached the point where i am able to ping the VM from the proxmox host as well as get a successful html response using curl which indicates to me that there is no issues between the host and the vm (i could be wrong)
now everyone's favorite part, Port Forwarding! this is where im having issues. With my current network setup I believe my only option is to do port forwarding from the host to the vm in order to be able to reach resources running on VMs from my main PC (please let me know if there is a better way with my current setup, I am relatively innexperienced when it comes to the network side of things.)
After trialing a mix of different solutions, so far i have failed at attempting to forward from a port on the host to a port on the vm. My current Network configurations look like this:
Proxmox Host:
auto lo
iface lo inet loopback
iface eno2 inet manual
auto vmbr0
iface vmbr0 inet static
address 10.0.0.76
netmask 255.255.255.0
gateway 192.168.100.1
bridge-ports eno2
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.0.0.76/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.76/24' -o vmbr0 -j MASQUERADE
iface wlo1 inet manual
# LAMP-1 10.0.0.74
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 9006 -j DNAT --to 10.0.0.74
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 9006 -j DNAT --to 10.0.0.74
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
VM:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.0.74
netmask 255.255.255.0
gateway 10.0.0.76
dns-nameservers 8.8.8.8
additional proxmox network info in case it is relevant
My initial goal is to be able to hit 10.0.0.76:9006 in browser from my main PC (same one i use to reach proxmox gui) that will then result in the html page from my VM at 10.0.0.74. or even simply being able to ping the vm from my main pc.
attempting to make https request to 10.0.0.76:9006 with the above configurations results in what i perceive to be a 404, but i may be missing something, i dont know that ive seen this type of response in my normal day to day failures. makes me think their could possibly be an issue with the hosts configuration? (i've only worked in windows environments up until now)
I know someone out their is itching to school a noob, any tips or reccomendations are highly welcome! Thank you all in advance. will provide additional information if requested.
So far I have successfully configured proxmox and am able to reach the proxmox admin console web gui from my main pc. I have spun up a Turnkey Linux VM and have reached the point where i am able to ping the VM from the proxmox host as well as get a successful html response using curl which indicates to me that there is no issues between the host and the vm (i could be wrong)
now everyone's favorite part, Port Forwarding! this is where im having issues. With my current network setup I believe my only option is to do port forwarding from the host to the vm in order to be able to reach resources running on VMs from my main PC (please let me know if there is a better way with my current setup, I am relatively innexperienced when it comes to the network side of things.)
After trialing a mix of different solutions, so far i have failed at attempting to forward from a port on the host to a port on the vm. My current Network configurations look like this:
Proxmox Host:
auto lo
iface lo inet loopback
iface eno2 inet manual
auto vmbr0
iface vmbr0 inet static
address 10.0.0.76
netmask 255.255.255.0
gateway 192.168.100.1
bridge-ports eno2
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.0.0.76/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.76/24' -o vmbr0 -j MASQUERADE
iface wlo1 inet manual
# LAMP-1 10.0.0.74
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 9006 -j DNAT --to 10.0.0.74
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 9006 -j DNAT --to 10.0.0.74
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
VM:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.0.74
netmask 255.255.255.0
gateway 10.0.0.76
dns-nameservers 8.8.8.8
additional proxmox network info in case it is relevant
My initial goal is to be able to hit 10.0.0.76:9006 in browser from my main PC (same one i use to reach proxmox gui) that will then result in the html page from my VM at 10.0.0.74. or even simply being able to ping the vm from my main pc.
attempting to make https request to 10.0.0.76:9006 with the above configurations results in what i perceive to be a 404, but i may be missing something, i dont know that ive seen this type of response in my normal day to day failures. makes me think their could possibly be an issue with the hosts configuration? (i've only worked in windows environments up until now)
I know someone out their is itching to school a noob, any tips or reccomendations are highly welcome! Thank you all in advance. will provide additional information if requested.