473,657 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connect Client Machine Remotely over the Internet

5 New Member
I just develop a simple 2 apps related with socket.
one is server and one is client. they are working fine in a LAN but i want that if my 2 apps is running in two different machine and there is no
lan connection, only internet connection is available then how two apps can interact with each by through socket programming other internet.

suppose there is two machine in two different office and there is no connection between two machine but both the machine can access internet.
in this type of situation how socket client can communicate with socket server which running in different office and internet is available in
2 different office.because we know socket server run on a port and wait for incoming connection and socket client will connect to socket server
through IP of that machine where socket server is running. but my situation we can provide IP address if both are member of same network/LAN but here i
told you that there is no connection between two machine where socket server & client is running. in this case what IP address i need to give to socket client to connect to socket server. i have no idea about this but i search google and found some scratch idea that this type of situation can be handle
through WAN IP. so please tell me is it right concept or not. if right then how socket client will know that what is the wan IP of that machine where socket server is running or suppose if i know the wan IP of that machine where socket server is running then can my socket client can communicate with
socket server just by WAN IP.

so please someone give me the idea in detail as a result i can handle this situation and also will be able that to program in such way that socket client
can communicate with socket server if there is no LAN connection but internet connection is available.

please help me with idea and if possible give me a sample code
Apr 27 '10 #1
4 2800
Frinavale
9,735 Recognized Expert Moderator Expert
I'm not very good with network stuff but I recommend that you look into using a Domain Name instead of directly specifying the IP of the server computer.

-Frinny
Apr 27 '10 #2
Banfa
9,065 Recognized Expert Moderator Expert
DNS is not the solution although it may be part of the solution if your company has its own DNS server. The solution to this problem is in the company firewall of the site hosting the server.

The firewall/router is the interface between your LAN and the WAN (internet). Anything outside the LAN only has access to the external side of the firewall/router and can only connect to its external (WAN) address. What you basically need to do is set-up a path through the firewall/router that will route external traffic onto you server on the internal LAN.

This is normally relatively simple, especially for the person managing the firewall/router who knows how it works. They set-up a firewall/router rule that anything connecting to a specific WAN address and port is forwarded to a specific LAN address and port. You make the LAN address and port the address of your server.

Then your client can connect to your server by connecting to the configured WAN address and port that has been set-up in the router/firewall to forward to your server.

I have been trying to find a diagram with IP address of a LAN/WAN connection through a router that makes thiis a little clearer but have been unable to.


Another option, if the firewalls of your 2 sites permit it is to set up a VPN. This effectively sets up and encrypted tunnel through the internet that links the 2 sites LANs into a single LAN. You client should then be able to connect directly using the LAN address of the server. However VPNs are rarely simple to set-up.
Apr 27 '10 #3
NeoPa
32,568 Recognized Expert Moderator MVP
Unless you're talking about internet servers, devices which have internet accessible IP addresses, this is not straightforward . Most of the world has been working hard to ensure this sort of thing is heavily restricted as it is a concept that would make life very easy for writers of malware. Hence it is that most PCs, even internet servers, are secured behind firewalls and are only addressable where absolutely necessary.

The good news is that there are ways to enable devices to communicate across the internet in a fashion almost identical to the situation where they share the same secure local network. This is not done within the software though. This would be configured by network specialists to enable disparate devices, and sometimes even networks, to communicate in such a way.

I suggest you speak with whomever it is that is responsible for your networks to see how best this can be set up for you.
Apr 27 '10 #4
Frinavale
9,735 Recognized Expert Moderator Expert
Thanks guys :)
Now that I'm sure this is a networking question I've moved it to the networking forum :)

-Frinny
Apr 27 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
4440
by: Damon | last post by:
I have been searching for post that matches my question and so far I have not found one, which leads me to believe what I want to do iasn't possible, but here I go... My current web host supports MySQL and I have in fact setup a small test database. I curerntly have a fairly simple VB app (a couple of forms, a 3rd party activeX control, limited Access DB reads and writes). It would be very helpful if I could run this app from home or...
9
1964
by: Tom Dacon | last post by:
I have a little desktop application (it happens to be a Windows Forms analog clock) that's written in VB.Net (2003). I placed a shortcut in my Startup program group to start it up when I log on. I have put no code in the application whatsoever to do internet communications, and yet when it starts up at logon I've begun getting notification dialogs from my software firewall that the app wants to connect to the internet. It doesn't happen...
16
27906
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my own LAN, the driver tells me it cannot make the connection. Here are the ODBC driver connection parms: Data Source Name: (free field - name my "my linux box" will do nicely) Host/Server Name (or IP) - something like MSQLUserName@ServerName.net...
30
7421
by: aka | last post by:
Hi I have a DB2 v8.1 on AIX and DB2 Connect EE on Solaris wich is connected to OS/390 DB2 subsystems via APPC / SNA. I have cataloged the DB2 Connect instance as tcpip node and then the Host DB cataloged on that node...this works from v7.2 Fixpack 11 clients and servers, but with v8.1 server I get SQL1334N. Does anyone has an idea? Thanks
5
5677
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere 4.0, SourceOffSite 4.1, VSS Connect 1.5, SourceXT 2.1, VSS Remoting 2.5,
3
4622
by: Reza | last post by:
Hello I tried this friday, but didn't get anywhere so trying again Basically, I have a fixed list of people that can access the application in the Intranet, and with the policy of the company the Users can be created only with Windows authentication in SQL Server - with SQL server authentication have no problem So every time I try to connect get the error message, "Login failed for user, 'username'. I have also tried windows authentication...
11
10313
by: Mikael Arhelger | last post by:
Hello, This has been posted a few times but still I could not find a way to connect to our database. We run DB2 Express on WIN2K server with XP clients. I can ping inside network and to the Internet from the server, so TCP/IP is ok. The DB2COMM=TCPIP is set also. Have been scratching my head for days now. Here some additional data (we are running SAP Business One):
3
8203
by: RFD | last post by:
I've been slaving at this problem for over a week, and would appreciate some help from you kind folks. Basic Problem: I have made a server program and a client program. When I try to use the client to connect to 127.0.0.1 or my LAN IP, the program connects and transfers information successfully. However, when I get somebody else to host the server, or when I try to connect to a server on my own machine using my WAN IP, I currently get a...
9
18551
by: bukzor | last post by:
I'm having an issue where my program hangs while doing socket.connect() for a couple minutes, then times out the connection and crashes. I'm connecting to an apache2 process on the same machine, for testing. When looking at netstat, the socket is in the SYN_SENT state, like this: $netstat -a -tcp tcp 0 0 *:www *:* LISTEN 7635/apache2 tcp 0 1 bukzor:38234 adsl-75-61-84-249.d:www
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.