Quantcast
Channel: General Networking
Viewing all articles
Browse latest Browse all 27527

NAT in a Proxmox server - Forwarding incoming ports to internal VMs

$
0
0

Helo ppl !!

I have an issue with Debian Proxmox x2.3 with 2 bridged NICS, vmbr0 (public IP) and vmbr1 (10.10.11.0/24).

There are 4 VMs going outside through NAT without any problem. All network is visible, all computers see all, etc. 'Till here all fine ! !

Now I want to forward some ports from the internet to internal VMs, but this is not working, and I'm not expert in this !

I tried a lot of things without any success:

iptables -t nat -A PREROUTING -i eth0 -p udp --dport 3389 -j DNAT --to-destination 10.10.11.3:3389
iptables -t nat -A PREROUTING -i vmbr0 -p udp --dport 3389 -j DNAT --to-destination 10.10.11.3:3389
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3389 -j DNAT --to-destination 10.10.11.3:3389

iptables -A PREROUTING -t nat -i eth0 -p tcp --source 212.212.212.85 --dport 25 -j DNAT --to 10.10.11.2:25

This is my interfaces file:

# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

auto vmbr1
iface vmbr1 inet static
address 10.10.11.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.10.11.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.11.0/24' -o vmbr0 -j MASQUERADE


auto vmbr0
iface vmbr0 inet static
address 212.212.212.85
netmask 255.255.255.0
gateway 212.121.212.254
broadcast 212.212.212.255
bridge_ports eth0
bridge_stp off
bridge_fd 0
network 212.212.212.0

Any tip ? :(


Viewing all articles
Browse latest Browse all 27527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>