0

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

*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -p tcp --dport 25565 -j DNAT --to-destination 192.168.122.232:25565
-A PREROUTING -p tcp --dport 25522 -j DNAT --to-destination 192.168.122.232:22
COMMIT

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

0

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 192.168.2.0/24 with your public IPv4 sub/net   ##

i used 192.168.0.14 instead of my router.

You must log in to answer this question.

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