NAT is not replacing internal address

rustam44

New Member
Mar 29, 2018
1
0
1
43
Hi,

I've install Proxmox VE 5.1-3. I followed the instructions here https://pve.proxmox.com/wiki/Network_Model#Masquerading_.28NAT.29_with_iptables and configured interfaces as follows:

Code:
auto lo
iface lo inet loopback

auto enp1s0
iface enp1s0 inet static
    address  x.x.x.33
    netmask  255.255.255.x
    gateway  x.x.x.1

auto vmbr0
iface vmbr0 inet static
    address  192.168.10.45
    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 '192.168.10.0/24' -o enp1s0 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '192.168.10.0/24' -o enp1s0 -j MASQUERADE

When I try to ping outside IP from guest machine (from IP 192.168.10.10), tcpdump on external host's interface shows that source address of icmp packets is 192.168.10.10, it doesn't replace internal guest's IP with external host's IP.

Any clue on what's the problem?

Edit: I wanted to mention that I had only one physical interface.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!