Hi i tried to make a server where every software running on it is in a vm. i tried using ufw to route the requests and it worked ... locally.

when i tried to connect to one of my vm using a vpn i saw this in tcpdump(ran outside a vm dump where we see the request but the ICMP for the response fail

Without the vpn and pinging the external ip of my router i get this successful exchange between the server and the router):

my routes are defined in /etc/ufw/before.rules as such

-A PREROUTING -p tcp --dport 25565 -j DNAT --to-destination
-A PREROUTING -p tcp --dport 25522 -j DNAT --to-destination

i did my test with the 25565 port. and my server is running fedora server. my VM can connect to the internet so it should be able to send the response back but the icmp fail at my host server.

the strangest part in all of that is that when i run nc $SERVERIP 25565 i get connection refused even if the port is open in my router

sorry for my approximative english i not a native speaker.

1 Answer 1


i followed this guide : https://www.cyberciti.biz/faq/kvm-forward-ports-to-guests-vm-with-ufw-on-linux/

and when i saw

## NOTE replace with your public IPv4 sub/net   ##

i used instead of my router.

You must log in to answer this question.

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