How to play with fiends Online Without Steam,Xbox etc Online Subsystems

Hey there i am currently working on a multiplayer game , to play online NOT LAN . And the second point is that i dont want players have steam or xbox account . i just want to send my game through email to my friend .I will open game from my side and host the game as listen server . and he just finds it and joins (No extra soft like Steam , XBOX required).

So how i make this ?

I have made the game where i launch the game and host as listen server , i have send my PUBLIC ip address to my friend via whatsapp he tried to connect but didnt really worked , but as LAN it works absolutely fine when client just enters a private IP address of server and joins .

So why is that happening and how to make this playable ONLINE ?

If it works while on LAN, with private IP addresses, but doesn’t work with public IP address, it is most likely not an issue with engine setup, but with network. You need to make sure that your router forward all required ports to private IP address of your PC.