Solved

Connecting TServerSocket & TClientSocket over Internet ?

Posted on 2015-02-16
7
244 Views
Last Modified: 2015-02-19
I can successfully connect TServerSocket & TClientSocket over LAN.
Similarly I check with MyIp.info and getting my current IP put it in the Client address and try to connect but it does not ?
0
Comment
Question by:Allan_Fernandes
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Expert Comment

by:MerijnB
ID: 40611954
You need to give more details. What is myip.info, where is the server located, are there routers, firewalls, etc?
0
 
LVL 24

Expert Comment

by:jimyX
ID: 40612093
So many questions have been asked about this issue. But it is not Delphi or code related issue, it is a Network Configuration.

I see what you tried. Although you have got the external IP of your computer, you can not use it for the Server Socket to be connected to it from another computer directly over the internet. For a very basic reason, networks are not designed to work like that, security-wise. MyIP.info does not provide you enough information, check this one to get what I mean. What do you see under network is the ISP server network that blocks your IP from being connected to, from outside.

So, since you could not connect then, you have what is known as a non-routable IP address, which is the one that everyone gets when connecting to the internet via ISP. To be communicating through the ISP.

You need to approach your ISP and request a public IP address, if they allow it they will rent you one.

Solutions:
It depends on what you are trying to do here.
If you need something like TeamViewer then you need to have Server (public IP).
Alternative, for simple transmissions, you can use online Database or if you have a website hosted at any Server you can use TidHttp and with some php help you can communicate very easily through the Database.
0
 
LVL 24

Expert Comment

by:jimyX
ID: 40612094
PS: Communications over the Internet are not fast.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Allan_Fernandes
ID: 40613544
I have a backup software and it works well over LAN / MPLS. I have been approached by a customer who says in his country it is not easy to get a Static IP  therefore other applications like Antivirus etc use methods wherein a new IP is allocated each time the Server connects to the Web and all the clients are supposed to use that.
0
 
LVL 24

Expert Comment

by:jimyX
ID: 40613590
Your customer wants to give the Server IP to other users (clients)?

Can you state clearly what you are after?
0
 
LVL 19

Accepted Solution

by:
MerijnB earned 500 total points
ID: 40613685
it is not easy to get a Static IP  therefore other applications like Antivirus etc use methods wherein a new IP is allocated each time the Server connects to the Web and all the clients are supposed to use that

If I understand correctly this means that you need to get  a server with a static IP somewhere, where both your client software and your server software connect to. This means you need to change the architecture of both your client and your server software.

Alternatively you can look into services like http://www.dynip.com/ this is probably the way of least resistance.

Once you have a static IP, or a dynamic DNS (like dynip) you need to configure the network configuration of your client.
I don't know where you are located, but I doubt you don't have your own public ip, I can image that your public ip isn't static. This is something you need to check though!
0
 

Author Comment

by:Allan_Fernandes
ID: 40618358
Thanks dynamic DNS services is exactly what I was looking for but did not know the terminology that my customer was talking about.

Clarification to jimyX,
What I meant is that my application's Client Modules (running on several machines within the LAN) connect to the Server Module (on a Predefined machine with static IP) , during Setup the Servers IP/Name is configured on each Machine. Thus building a simple Socket Connection.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now