473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Access internal network locations from Internet

I have been asked to come up with a way to make a instant message program
that will allow our outside customers by clicking on a name in a drop down
menu can IM who they want.

THe application I have works after telling my router to forward all
communications from Port 5000 to a local IP address that contains the
"Socket Server" program.

mobjClient = New TcpClient("zz.zzz.zz.zz", 5000)
mobjClient.GetStream()

DisplayText("Connected" & vbCrLf)

mobjClient.GetStream.BeginRead(marData, 0, 1024, AddressOf DoRead,
Nothing)
Send(ipadd & " online")

THe only problem is that all users would get this message that are running
the client........not just the individual being requested.

Is there a way in this code sample to tell it to divert to a local IP(or
machine name) running the client within this network?
Nov 20 '05 #1
11 3285
Cor
Scorpion,
I dont think so, but you can look voor NAT (Network Adress Translator).

I hope it puts you a very little bit on the route.
Cor
Nov 20 '05 #2
Thanks Cor.......

I will try looking under vb.net and nat in google.

This topic does not have a lot of information that I can find. It has been
frustrating. It must be able to be done though because MSN Messenger does it
quite nicely.

"Cor" <no*@non.com> wrote in message
news:3f**********************@reader20.wxs.nl...
Scorpion,
I dont think so, but you can look voor NAT (Network Adress Translator).

I hope it puts you a very little bit on the route.
Cor

Nov 20 '05 #3
"Cor" <no*@non.com> wrote in news:3f6c51b8$0$4255$48b97d01
@reader20.wxs.nl:
Scorpion,
I dont think so, but you can look voor NAT (Network Adress Translator).

I hope it puts you a very little bit on the route.
Cor


NAT won't do you any good if the request is coming from the WAN side. NAT
can only redirect the data properly if the request originated from the
LAN side.

However, here are some suggestions:

-Each user has their own port. All requests coming into that port would
be redirected to a particular LAN user.

-Pass more data to the LAN side (i.e. Username). Have a proxy application
on the LAN server parse and forward the information to the proper client.

BTW, regarding the original posts, I find it funny that your router would
forward a packet from the WAN side with no particular matching NAT entry
to all clients... this is kind of dangerous when you think about it...

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #4
Thanks Cor.......

I will try looking under vb.net and nat in google.

This topic does not have a lot of information that I can find. It has been
frustrating. It must be able to be done though because MSN Messenger does it
quite nicely.

"Cor" <no*@non.com> wrote in message
news:3f**********************@reader20.wxs.nl...
Scorpion,
I dont think so, but you can look voor NAT (Network Adress Translator).

I hope it puts you a very little bit on the route.
Cor

Nov 20 '05 #5
"Cor" <no*@non.com> wrote in news:3f6c51b8$0$4255$48b97d01
@reader20.wxs.nl:
Scorpion,
I dont think so, but you can look voor NAT (Network Adress Translator).

I hope it puts you a very little bit on the route.
Cor


NAT won't do you any good if the request is coming from the WAN side. NAT
can only redirect the data properly if the request originated from the
LAN side.

However, here are some suggestions:

-Each user has their own port. All requests coming into that port would
be redirected to a particular LAN user.

-Pass more data to the LAN side (i.e. Username). Have a proxy application
on the LAN server parse and forward the information to the proper client.

BTW, regarding the original posts, I find it funny that your router would
forward a packet from the WAN side with no particular matching NAT entry
to all clients... this is kind of dangerous when you think about it...

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #6
"scorpion53061" <sc************@yahoo.com> wrote in news:#s2r4S5fDHA.3284
@tk2msftngp13.phx.gbl:
Lucas and all,

Thank you for response.

In the code attached can you tell me how I would:

"LAN server parse and forward the information to the proper client"

This is the server code that the traffic is coming to that is
sending/receiving messages.


Your server code sits on a server that has access to the WAN and LAN
right? Your server uses Port 5000? Port Map Port 5000 in your router to
the machine hosting server code - all incoming requests to port 5000 will
only be sent to the machine with the server.

When an IM user logs in, your server will need to track which users are
online, and associate their internal IP with their username (or some
other unique form of identification).

On your website, you have a list of all users logged in right? Thus, when
an external user submits your form with the appropriate user they want to
contact, your server would do a look up and match the username to the IM
user's internal IP. Once you have the internal IP, it would be very easy
to send the message directly to the client.

So basically your architecture would look like this:

WAN LAN
Web user <-> Web Page <-> || <-> Server <-> IM

|| Is your router/firewall.

See how the Server acts as a proxy, relaying requests between WAN and
LAN?

So in your code, you'll need to beef up server code so you can redirect
the message to a particular user behind the firewall.

BTW, which IM software are you using?

To sum it up, the key is for your server code to know the internal IP
address of the IM client, so that the message can be directed to a
particular IM user.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #7
"scorpion53061" <sc************@yahoo.com> wrote in news:#s2r4S5fDHA.3284
@tk2msftngp13.phx.gbl:
Lucas and all,

Thank you for response.

In the code attached can you tell me how I would:

"LAN server parse and forward the information to the proper client"

This is the server code that the traffic is coming to that is
sending/receiving messages.


Your server code sits on a server that has access to the WAN and LAN
right? Your server uses Port 5000? Port Map Port 5000 in your router to
the machine hosting server code - all incoming requests to port 5000 will
only be sent to the machine with the server.

When an IM user logs in, your server will need to track which users are
online, and associate their internal IP with their username (or some
other unique form of identification).

On your website, you have a list of all users logged in right? Thus, when
an external user submits your form with the appropriate user they want to
contact, your server would do a look up and match the username to the IM
user's internal IP. Once you have the internal IP, it would be very easy
to send the message directly to the client.

So basically your architecture would look like this:

WAN LAN
Web user <-> Web Page <-> || <-> Server <-> IM

|| Is your router/firewall.

See how the Server acts as a proxy, relaying requests between WAN and
LAN?

So in your code, you'll need to beef up server code so you can redirect
the message to a particular user behind the firewall.

BTW, which IM software are you using?

To sum it up, the key is for your server code to know the internal IP
address of the IM client, so that the message can be directed to a
particular IM user.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #8
Your server code sits on a server that has access to the WAN and LAN
right? Your server uses Port 5000? Port Map Port 5000 in your router to
the machine hosting server code - all incoming requests to port 5000 will
only be sent to the machine with the server.

That is exactly what I have currently.

When an IM user logs in, your server will need to track which users are
online, and associate their internal IP with their username (or some
other unique form of identification).
They currently log in to our customer software which validates through a SQL
Server table called LOGINS. They can then select n in a drop down menu
select say "Plumbing Pricing Questions". Then the client software opens and
establishes a connection to the socket server. From there is where I dont
know how to direct the request to teh local IP at that point.

On your website, you have a list of all users logged in right? Thus, when
an external user submits your form with the appropriate user they want to
contact, your server would do a look up and match the username to the IM
user's internal IP. Once you have the internal IP, it would be very easy
to send the message directly to the client.
Okay so lets say I create another SQL table with these 2 fields for those
the customers are requesting to message with their local IP address so it
would be:

DEPARTMENT
Plumbing Pricing Questions

LOCALIP
155.155.1.30

I somehow have to get the socket server to acknolwedge the incoming request
as being for "Plumbing Pricing Questions" and then direct the message to
that IP.

So in your code, you'll need to beef up server code so you can redirect
the message to a particular user behind the firewall.


Yes exactly...........this is where I am stuck.
Nov 20 '05 #9
"scorpion53061" <sc************@yahoo.com> wrote in
news:uQ**************@TK2MSFTNGP11.phx.gbl:
I somehow have to get the socket server to acknolwedge the incoming
request as being for "Plumbing Pricing Questions" and then direct the
message to that IP.


You might have to beef up your connect code. Upon connection, you make the
client to send a string/ID with which department they are handling. Save
this information somewhere, maybe as a variable in the client object?

I noticed you store a collection of clients in your code you posted
earlier. If you know which client connection is associated with which
department, you could loop through your collection of client objects, find
the proper client, and send the information to that one particular
client???

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #10
Do you or anyone else know a good book that specializes in vb.net and socket
programming? Of what I am trying to do here?

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .
"scorpion53061" <sc************@yahoo.com> wrote in
news:uQ**************@TK2MSFTNGP11.phx.gbl:
I somehow have to get the socket server to acknolwedge the incoming
request as being for "Plumbing Pricing Questions" and then direct the
message to that IP.


You might have to beef up your connect code. Upon connection, you make the
client to send a string/ID with which department they are handling. Save
this information somewhere, maybe as a variable in the client object?

I noticed you store a collection of clients in your code you posted
earlier. If you know which client connection is associated with which
department, you could loop through your collection of client objects, find
the proper client, and send the information to that one particular
client???

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 20 '05 #11
It is on the server end.

I am lost at trying to get a list of internal IP's online
and how to direct messages to them from customers.

I am not even sure how to transfer the variables involved
(custname, and user they are seeking) to transfer to the
server program and how to restrict the conversation to
strictly between those two.

If you can help with this I would be very greatful.
Email me off list if you are willing.
-----Original Message-----
"scorpion53061" <sc************@yahoo.com> wrote in
news:##**************@TK2MSFTNGP09.phx.gbl:
Do you or anyone else know a good book that specializes in vb.net and socket programming? Of what I am trying to do here?
Not really, but I'm sure Wrox Publishing has one.

Actually your applicationseems pretty straight forward. I still don't understand why you're havingtrouble distinguishing which socket connection belongs to which client : )

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.http://members.ebay.com/aboutme/coolspot18/
.

Nov 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stefan Mueller | last post by:
I've just installed phpMyAdmin. If I have the line $cfg = 'http://localhost/php/phpmyadmin'; in my config.inc.php I can login to phpMyAdmin without any problems from my local machine. But it's...
4
by: Peter Larsson | last post by:
Hello everybody, I'm developing a system for a company that has production at two different locations. The production is stored in an Access database at each location, and I need to find a way...
1
by: GAVO-UK | last post by:
Hi - Using Access 2003 I've been creating applications in access for the past few years and gotten pretty good at it, now I would like to move a bit forward and start using ms access project. ...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
1
by: scorpion53061 | last post by:
I have been asked to come up with a way to make a instant message program that will allow our outside customers by clicking on a name in a drop down menu can IM who they want. THe application I...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
17
by: Flic | last post by:
Is this possible? I know about a bit about ODBC and found how to import an ODBC database stored on the computer, however I am after accessing an SQL database stored on a webserver. I'd like to...
1
by: Michael | last post by:
Hello, I am trying to develop a database solution for an organisation in Indonesia. This organization has a number of offices and users throughout the country. They all need to maintain their...
6
by: =?Utf-8?B?SWJyYWhpbS4=?= | last post by:
Hi, I have a client application which Accesses Web Service. but the Web service allows anonymous access to any client request (web/smart client). I want to authenticate every client request by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.