I click a lot but I got Server isnt available. Is there any way to test if server port is reachable via UDP? By using netcat or something?
I haven't actually checked the networking code, but to me it seems that the "ping" the client uses actually goes through the server on UDP 7777. IOW, it is
not the ICMP "ping" everyone uses. It can't be, because even if the server is "failed", the machine itself stays up, so an ICMP ping goes through regardless (as do http requests, since laanx hosts the status page and the updater system (and BT tracker?), none of which go down when the game server crashes). Also, the "ping" response time reported by the client is always slightly higher than that of an ICMP ping, implying extra delay in the server. You could use a sniffer like tcpdump to see if the client pings as ICMP or UDP (contrary to what the name implies, tcpdump can dump all sorts of traffic).
Therefore, I think that when the client's ping comes back, the UDP part essentially is set up OK. If it doesn't, then the UDP connection does not work properly.
The issue about the server responding to pings but upon login reporting "not reachable" I also get occasionally. I believe, however, that this is an entirely different issue, and in fact in conjunction with lag (the server drops requests for logins if it's lagging already, which makes perfect sense, so the client doesn't receive it's reply and therefore times out (notice the delay) and then pops up that message).
What might be the problem is that the router must also allow incoming UDP packets. Specifically forwarding UDP 7777 to the client PC may be necessary as well.
You can also try the
IPCop dedicated firewall, at least for testing, because that works fine with PS without any modification. If you use IPCop and PS still doesn't work, then the problem either is with your client PC (it may be blocking UDP traffic) or your ISP.
Edit:
I just did a tcpdump and indeed the client uses UDP for it's "ping". The dump of a working connection looks like this:
# tcpdump udp -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
19:51:04.129296 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23 (client to laanx "ping")
19:51:04.473411 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23 (laanx to client "pong")
19:51:05.523297 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:05.866223 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
19:51:06.916298 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:07.250911 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
19:51:08.300298 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:08.635830 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
19:51:09.735296 IP 10.0.126.17.32842 > 210.193.49.103.7777: UDP, length 23
19:51:10.076448 IP 210.193.49.103.7777 > 10.0.126.17.32842: UDP, length 23
...