I wrote a simple chat program which perfectly runs on the local host. But, when the client tries to connect to the server via the Internet using the public IP and the port-9999, it does not work as it did on LAN.
As many people have suggested, I did Port-Forwarding as shown in the following figure.
After configuring Port-Forwarding this website indicates that port-9999 remains open for the specific public IP (I run the server on 192.168.1.100 on private network). Although the port remains open, the client cannot connect to the server. Then I disabled the Windows firewall and tried the same process. But the problem still persists.
Please can someone tell me how can I solve this problem..?