So i have a virtual machine in a private internal network on with an ip address of

The external network is I would like to forward all traffic on an external ip to the vm on This is what I have done...

First I add a secondary IP to an interface

ip addr add dev eno1

Then I use these 2 iptables commands to setup the nat

iptables -t nat -A PREROUTING -d -j DNAT --to-destination
iptables -t nat -A POSTROUTING -s -j SNAT --to-source

This actually works. I can now ssh into and i will be in the kvm instance with an ip of

However, My problem is sometimes in ssh my entire connection just freezes. This happens all the time when I run commands like top or systemctl or man ip here is an example of top output right before it locks up my whole console

top - 19:45:58 up 2 days, 23:56,  3 users,  load average: 0.00, 0.00, 0.05
Tasks: 106 total,   1 running, 105 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3936.3 total,   2479.2 free,    150.1 used,   1307.0 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   3505.6 avail Mem

There is suppose to be way more output then just this ^^^ From here I can't ctrl C, ctrl Z, or q when I am in man. The problem goes away when I don't use and use to connect instead. I know for a fact its only when I use to connect.

Could the problem be MTU fragmentation?

Any help would be appreciated.

EDIT: I just learned that anything over 1472 in ping -s 1472 gets dropped.

1 Answer 1


So my problem was entirely MTU. The host machine had an mtu of 1500 on the physical interface and an mtu of 1450 on the virtual device (This is for vxlan encapsulation). Along with this, the VM on the host machine had an mtu of 1500 which was causing the entire issue.

Change the mtu in linux

ip link set dev eth0 mtu 1500

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .