How can I access to Chat Server through the mid Web Server?

My flow in Chat is:

Client (Dialup) =======> Web Server (IP Internet) =========> Chat Server (IP Lan)

Client (Dialup) =======######cannot access#######====> Chat Server (IP Lan)

(Client cannot access to Chat Server through 5222 - default chat port)

I use Applet Chat in Web Server.

How can I solve this problem?

I always got the error: Cannot connect to chat server.

Please help me! Thanks!