Is it possible to see the real IP of someone connecting trough my ZT portforwad?

I dont have public IP in my home network.

So i use Zerotier in a VPS to portforward to my home network and host a minecraft server.
But everyone login with the “same ip” provided by zero tier, something like.
My PC ZT ip: 10.147.17.2
VPS ip: 10.147.17.1
and a iptables config like that:
sudo iptables -t nat -A PREROUTING -p tcp --dport 25565 -j DNAT --to-destination 10.147.17.2:25565

And when someone enter my server i see:
username1 logged in with 10.147.17.1:40000
username2 logged in with 10.147.17.1:40001
username2 logged in with 10.147.17.1:40001

is there any way to portforward with the real ip of someone connecting to my home server?
my SO is ubuntu server in the VPS and in my home server.

Not from your Minecraft server, no, because that rule is NATing everything to make it look like the connection is coming from your VPS rather from the real IP.
I assume that if your Minecraft server saw the real IP that the connection was coming from then it would be sending replies directly out to the clients rather than via the VPS, which wouldn’t work.

Cool that you have that working!

Maybe there is an iptables trick. But I think adekker is right.
You can definitely log the original ip addresses in iptables.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.