Home » Howto & Style » How to setup Proxmox with Single Public IP and share with VMs | Proxmox Tutorial

How to setup Proxmox with Single Public IP and share with VMs | Proxmox Tutorial

Written By GreyTech on Sunday, Mar 21, 2021 | 12:15 AM

 
In this video I will show you how to setup proxmox with one single public IP and then share certain ports to other local vms with local IP. What you are doing is just a simple routing rule you setup for route the traffic on this port to your local vm internal IP. #proxmox #virtualmachine #ipaddress #networking Example of the rules we will be using in this video: iptables -t nat -A PREROUTING -p tcp -d 198.0.10.172 --dport 80 -i vmbr0 -j DNAT --to-destination 192.168.10.160:80 iptables -t nat -A PREROUTING -p tcp -d 198.0.10.172 --dport 443 -i vmbr0 -j DNAT --to-destination 192.168.10.160:443 iptables -t nat -A PREROUTING -p tcp -d 198.0.10.172 --dport 27015 -i vmbr0 -j DNAT --to-destination 192.168.10.150:27015 iptables -t nat -A PREROUTING -p udp -d 198.0.10.172 --dport 64100 -i vmbr0 -j DNAT --to-destination 192.168.10.150:64100 Add this NAT outbound Rule to your VM can get to the internet iptables -A POSTROUTING -t nat -s 192.168.10.0/24 -j MASQUERADE iptables -A POSTROUTING -t nat -s ‘192.168.10.0/24’ -o vmbr0 -j MASQUERADE iptables -D POSTROUTING -t nat -s ‘192.168.10.0/24’ -o vmbr0 -j MASQUERADE Remove NAT Rule iptables -t nat -L --line-numbers iptables -t nat -D PREROUTING 7 Save Rules iptables-save If you still can't get it then please see this example below auto lo iface lo inet loopback iface eno1 inet manual auto vmbr0 iface vmbr0 inet static address 198.100.140.170/24 gateway 198.100.140.1 bridge-ports eno1 bridge-stp off bridge-fd 0 auto vmbr1 iface vmbr1 inet static address 192.168.10.100/24 bridge-ports none bridge-stp off bridge-fd 0 post-up echo 1 replacewithangleyoutubewontallowit /proc/sys/net/ipv4/ip_forward post-up iptables -t nat -A POSTROUTING -s '192.168.10.0/24' -o vmbr0 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '192.168.10.0/24' -o vmbr0 -j MASQUERADE ==Hardware/Parts that I recommend== Computer/Electronics Repair Tool Kit - https://amzn.to/2HYs46Z​ SUBSCRIBE TO GREYTECH - https://url.greytech.live/MWDs1 FOLLOW US ON TWITTER - https://url.greytech.live/3L8rjS DISCORD SERVER INVITE - https://url.greytech.live/RuR0X OUR WEBSITE - https://url.greytech.live/hn0f1 DISCLAIMER: This video and description may contain affiliate links, which means that if you click on one of the product links, I’ll receive a commission. This helps support the channel and allows me to continue to make videos just like this and purchase products to review. I will never support or push a product I don't believe in and have used myself. GreyTech videos are for educational purpose only. Thank you for your support.