I just created a simple chat client and it only works when all clients / server are portforwarded on the same port.
How do i make my application (its in c# and uses .net sockets btw) work without the need of port forwarding for clients (i dont care if server needs to port forward).
it uses udp by the way.
You need a server somewhere in the middle that all the clients connect to. You cannot have 1 client behind a nat box connect to another client behind a nat box. They both need to connect to a server and keep that connection open. Client A then sends a message to the server which forwards the message onto client B.