I've once used the same method as Germanunkol, it worked ok.

problem was that the few servers made by players were usually unconnectable because the users didn't forward the ports the server needed. They didn't know their servers were unconnectable and they stayed in the list because regular updates were send.

Others players quickly got frustrated when they couldn't connect to any game.

A much cleaner solution would be server-side checking for the "connectablility" of the servers. You could try to connect via raw UDP with ANET and PHP (if UDP is allowed on your server), or you'd have to use an external program.