I'm writing a client/server application it is necessary for my users to have the necessary listening ports open on their router/firewall.


Is there any method that I can use to detect this? I'm willing to write a seperate server application that they can ping, and then that application can try a TCP connection back to the original app. If it times out and fails, I can assume that their ports are being blocked, and can send out a UDP message?

I'm new at all this, but my applications are complicated and I need to automate things as much as possible for the end user.