473,406 Members | 2,745 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,406 software developers and data experts.

Listening to a port via a DSL router/modem

My code starts a TCP/IP socket listener and waits for incoming connections.
This works fine on my system and my test system but I have a customer who
say it does not work on their system. As far as I can tell the problem is
they are using a DSL modem with a router internal to it. So basically my
software is listening to IP address 10.0.0.3 but the external connection is
trying to connect to xx.xx.xx.xx on the internet which in concept should get
routed from there to 10.0.0.1 and then to the computer at 10.0.0.3.

Internet -> xx.xx.xx.xx -> router(10.0.0.1) -> computer (10,0.0.3) -> my
code.

snippet of my code:
IPAddress ipAddress = IPAddress.Any;
IPEndPoint localEndPoint = new IPEndPoint(ipAddress,
Convert.ToInt32(SocketPort));
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
listener.Bind(localEndPoint);
listener.Listen(10);

Their modem is a SpeedStream 5200 from Efficient Networks.

Anybody have a suggestion on what to change to make this work?

Regards,
John
Nov 16 '05 #1
6 4257
Hi John,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you application works on most cases.
However, it doesn't work when the customer is using a DSL modem with
router. If there is any misunderstanding, please feel free to let me know.

As far as I know, this has to work no matter what Internet connection the
customer is using. Generally, I think this issue might have something to do
with the DSL router configuration. Please try to check if some ports has
been blocked. Can this be reproduced on other DSL routers?

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #2
Hello Kevin,

Yes I think you understand correctly.

So basically what you are saying is if I open listener on port 1000 at IP
address 10.0.0.3 and another computer on the internet attempts to connect
via port 1000 on IP address 200.20.30.140 (example) the router will know to
pass the data along?

I understand what you mean by opening the port since I have to enable ports
on my local firewall. But not be an expert on DSL modem/routers I am having
trouble explaining this to the customer and I don't know the procedure that
model.

Regards,
John
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:ic**************@cpmsftngxa10.phx.gbl...
Hi John,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you application works on most cases.
However, it doesn't work when the customer is using a DSL modem with
router. If there is any misunderstanding, please feel free to let me know.

As far as I know, this has to work no matter what Internet connection the
customer is using. Generally, I think this issue might have something to do with the DSL router configuration. Please try to check if some ports has
been blocked. Can this be reproduced on other DSL routers?

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3
Hi,
inline
"John J. Hughes II" <no@invalid.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
My code starts a TCP/IP socket listener and waits for incoming connections. This works fine on my system and my test system but I have a customer who
say it does not work on their system. As far as I can tell the problem is
they are using a DSL modem with a router internal to it. So basically my
software is listening to IP address 10.0.0.3 but the external connection is trying to connect to xx.xx.xx.xx on the internet which in concept should get routed from there to 10.0.0.1 and then to the computer at 10.0.0.3.

Internet -> xx.xx.xx.xx -> router(10.0.0.1) -> computer (10,0.0.3) -> my
code.
A router has at least two ip addresses so I guess you mean sometime like
this:

Internet -> [xx.xx.xx.xx <router> 10.0.0.1] -> computer (10.0.0.3)

You are most likely talking about a NAT-router. Which is more then just a
router but behaves different.

- When 10.0.0.3 tries to access the internet the (nat)router will change the
source-ip so that it looks like it comes from xx.xx.xx.xx and on reply it
will do the oposite and change the destination-ip of xx.xx.xx.xx to
10.0.0.3; this happens before routing so that the router will route the
reply to 10.0.0.3 .

- If someone tries to access xx.xx.xx.xx it will stop at that IP unless
something at that point changes the destination-ip so it can be further
routed ( called DNAT ). This will not happen by itself. You should look
into the configurations of the (nat)router and see if it can do something
called "Port-Forwarding " or "DNAT" where you usually can map an external
port (xx.xx.xx.xx:yy) to an internal (eg. 10.0.0.3:zz) .
HTH
greetings




snippet of my code:
IPAddress ipAddress = IPAddress.Any;
IPEndPoint localEndPoint = new IPEndPoint(ipAddress,
Convert.ToInt32(SocketPort));
Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
listener.Bind(localEndPoint);
listener.Listen(10);

Their modem is a SpeedStream 5200 from Efficient Networks.

Anybody have a suggestion on what to change to make this work?

Regards,
John

Nov 16 '05 #4
Thanks for the response.

I tried it at a friends house this morning but could not get my software to
run on his system correctly but basically in regards to the NAT I had to do
something like:

telnet 10.0.0.1

set nat entry add 10.0.0.10 1111 tcp

But his was a Cisco 677 and the customer has a Speedstream 5200 so I am
still at a loss.

Regards,
John
Nov 16 '05 #5
Hi,

"John J. Hughes II" <no@invalid.com> wrote in message
news:uu**************@TK2MSFTNGP09.phx.gbl...
Thanks for the response.

I tried it at a friends house this morning but could not get my software to run on his system correctly but basically in regards to the NAT I had to do something like:

telnet 10.0.0.1

set nat entry add 10.0.0.10 1111 tcp or if you don't have a static public ip : set nat entry add 10.0.0.10 1111
0.0.0.0 1111 tcp
write
reboot

This should work, make sure there are no firewalls (sw or hw) blocking.
You can also use "show nat" to see current portforwarding information.

But his was a Cisco 677 and the customer has a Speedstream 5200 so I am
still at a loss.
Anyway it has nothing to do with your c# code and everything with
(nat)routing.

Check out http://www.portforward.com/efficient/5200.htm and more importend
check with the ISP, they can pre-configure it and maybe you shouldn't/can't
change the configuration.

HTH
greetings


Regards,
John

Nov 16 '05 #6
Hi John,

It is impossible for a computer on the internet to connection to the
computer behind the router without configuring the Port-Forwarding option
as BMermuys mentioned, because when router get the data package it will not
know which address to forward to. However, the computer behind the router
can connection to that computer which connects to the Internet directly.

So please try to have the customer setting this option, and it should work.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #7

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

Similar topics

1
by: David | last post by:
hi i try to connect to my site on port 80 from my local network no probleme but from outside is do not work like no site a this address ! my firewall is redirect port 80 on my local IP (the...
3
by: Laszlo Csabi | last post by:
Hi guys, What I would like to achieve is create a client-server messenger application. The problem I run into is : I have created a listener socket on the client and connect to the remote...
3
by: MLH | last post by:
I found some code Dev Ashish posted nearly a decade ago in response to someone's inquiry describing their need to dial a number, monitor call progress and determine whether it was busy. This was...
4
by: Sean | last post by:
Hi, I'm programming an IRC bot. I'm trying to establish a dcc connection with another IRC client. I give the ipaddress and port number to the client in the request. I listen to that port with...
6
by: kai | last post by:
Hi, I was tring to run an example (HelloWorld.aspx) from MSPrss book, I get this message: "ASP.NET Development Server faild to start listening port 1034. Error message: An attempt was made...
17
by: Franc Zabkar | last post by:
My D-Link DSL-302G modem/router has a real-time clock whose settings are volatile. To avoid hand keying the date/time via the modem's JS interface, I wonder if there is a way to copy the JS code to...
3
by: Nutshell | last post by:
Hello everybody, in my application I'd need to know if a com port is a modem or not (and eventually its description and if it is a null modem). I get the list of com ports available with: string...
6
by: ConsoleElosnoc | last post by:
Hi everyone =), Okay, this is not my problem.. this is my friend's problem (He lives in NY and I live in Vancouver) so I couldn't be physically there to see what's wrong... By chance (or a...
1
by: ghe | last post by:
Good day, I have this DSL connection which has a dynamic IP address, then I have a new Linksys router(wired), and I had set-up my linksys router through it's web-based “Setup” utility, I had use...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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...
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,...
0
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...

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.