Hello,
I currently have two proxmox nodes(physical, on different ip ranges). Also have 3 proxmox VM-s on the same /24 NAT(10.0.60.0) on proxmox node 1.
On 10.0.60.0/24 there are only those 3 proxmox vm-s to avoid confusion.
Both of my proxmox nodes have only a single ipv4. I've got 3 proxmox VM-s for testing as I've broken my hypervisors too many times already.
My question:
What is the best way to do port forwarding from the host to the guests?
Here's what my /etc/network/interfaces file looks like(the rest of my subnets are just copies of vmbr1):
This exactly achieves what I need, but any changes don't seem take effect until a reboot has taken place. My dedicated server(pmox node 1) takes minutes to reboot at online.net.
I get network in and out of my VM-s, so it works.
I've tried a few days ago to add manual iptables rules to the host, but it seems those are automatically dropped/disregarded by proxmox software running in the background.
Is there a better way to run VMs on a single IP?
Would something like using Tinc VPN be better?
Thank you for help.
pve version:
4.1.5
Installed over debian 8 via the jessie wiki.
I currently have two proxmox nodes(physical, on different ip ranges). Also have 3 proxmox VM-s on the same /24 NAT(10.0.60.0) on proxmox node 1.
On 10.0.60.0/24 there are only those 3 proxmox vm-s to avoid confusion.
Both of my proxmox nodes have only a single ipv4. I've got 3 proxmox VM-s for testing as I've broken my hypervisors too many times already.
My question:
What is the best way to do port forwarding from the host to the guests?
Here's what my /etc/network/interfaces file looks like(the rest of my subnets are just copies of vmbr1):
Code:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 123.123.123.123
netmask 255.255.255.0
gateway 123.123.123.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 10.0.10.1
netmask 255.255.255.0
bridge_ports none
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.10.0/24 -o vmbr0 -j SNAT --to-source 123.123.123.123
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 10000 -j DNAT --to-destination 10.0.10.2:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 10001 -j DNAT --to-destination 10.0.10.2:22
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 10002 -j DNAT --to-destination 10.0.10.3:22
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 10003 -j DNAT --to-destination 10.0.10.4:22
This exactly achieves what I need, but any changes don't seem take effect until a reboot has taken place. My dedicated server(pmox node 1) takes minutes to reboot at online.net.
I get network in and out of my VM-s, so it works.
I've tried a few days ago to add manual iptables rules to the host, but it seems those are automatically dropped/disregarded by proxmox software running in the background.
Is there a better way to run VMs on a single IP?
Would something like using Tinc VPN be better?
Thank you for help.
pve version:
4.1.5
Installed over debian 8 via the jessie wiki.
Last edited: