Ardinuo Mega - Fails to send data on Static IP

Hi All

Problem - Connect GSM900 shield to a PC with serial/USB cable and do AT commands to connect to a remote TCP server, connection happens but No data is transferred.

Details of client PC - My PC is on 192.168.0.20 and it is connected to a D-Link Router with address in WAN
DHCP 10.137.55.40, if I do whatismyIP - I get 183.83.79.90, this confirms my PC is behind NAT.

Details of Server PC - is with same service provider, but on a different leased network and is on static IP ( 183.96.x.y) is directly connected to ISP modem.

What works - If I run a SocketCommunication program on my client - it gets connected to my server and responds properly. Even a simple python server also receives data

NOT works - if I connect my client PC to a GSM/GPRS shield and do AT commands - then it shows
TCP connected successful, but if

I enter data > "Hello" followed by CTRL-Z - there is No response and NO data goes - server prints some garbage data.
Code in server is in Java

Question 1) I tried Port forwarding as it is behind NAT etc - but if network/port/firewall was a issue; why is Socket program running fine - no external hardware is involved here.

iS data is getting transmitted from GSM/GPRS module to Ubunto Server through wireless? if yes then why problem,

Is there any specific PORT to be assigned for GSM modules?
Same port works in Socket programs

Please respond ASAP as we are stucked

Thanks
Suraj

This is an Arduino support forum. Your problem is in no way related to the Arduino platform. Go and use an appropriate forum!