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

TcpListener with external/internet IP?

I have a test application that transfers files from a client to a
server. I've been locally testing this on my local LAN and it has been
working fine. However, when I try to transfer a file over the internet
(with the port opened up in the router, no firewalls), it never
connects. I'm thinking it is due to the TcpListener only binding to my
local LAN ip. I tried binding it to my internet IP manually and by
using gethostbyname(gethostname).addresslist(0) as well as using
ipaddress.any, but the client never connects to my machine. An error
occurs on the client's end saying it wasn't able to connect and timed
out, etc, etc.

Is there something I'm missing? Any help is greatly appreciated. Thanks
in advance

Sep 20 '06 #1
3 2058
Hello ms****@gmail.com,

You have to tell your router to forward any incoming packets on port (whatever)
to your internal address. Check your router manual for NAT settings.

-Boo
I have a test application that transfers files from a client to a
server. I've been locally testing this on my local LAN and it has been
working fine. However, when I try to transfer a file over the internet
(with the port opened up in the router, no firewalls), it never
connects. I'm thinking it is due to the TcpListener only binding to my
local LAN ip. I tried binding it to my internet IP manually and by
using gethostbyname(gethostname).addresslist(0) as well as using
ipaddress.any, but the client never connects to my machine. An error
occurs on the client's end saying it wasn't able to connect and timed
out, etc, etc.

Is there something I'm missing? Any help is greatly appreciated.
Thanks in advance

Sep 20 '06 #2
I've done that already. I have it forwarding both TCP and UDP even to
my internal IP.

Sep 21 '06 #3
Nevermind, it seems I overlooked a previous entry in my port forwarding
where I had used the same test port before and had it forwarded to
another machine on my LAN. Changed that, and works great now.

Sep 21 '06 #4

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

Similar topics

1
by: Doug Wyatt | last post by:
So I'll preface this with the fact that I'm a UNIX developer by training and have just recently gotten in to C# development on Windows. I'm basically running in to a problem whereby I suspect...
4
by: Rob White | last post by:
OK, so I have a TcpListener that is waiting for sockets, this piece of code: IPAddress localAddress = Dns.GetHostByName(Dns.GetHostName()).AddressList; IPEndPoint localEP = new...
0
by: Wizou | last post by:
1. Create a TcpListener 2. Start a child Process 3. Kill the parent process => You can't bind to the port until you close the child process Variant : 3. Terminate normally the parent process...
2
by: Dave Coate | last post by:
Hi, I am working on a client-server app. I can get two applications to talk to each other on the same machine using 127.0.0.1, but as soon as I try it using a computer name or actual IP address...
1
by: mb | last post by:
Hi, I picked up this JavaScript code (quiz code) at: http://javascript.internet.com/miscellaneous/multiple-choice-quiz.html and modified it (and may have deleted some line I shouldn't have) so...
5
by: Jerry Spence1 | last post by:
I have the following example of a tcpListener. I have a device external to my PC which is sending a TCP request on port 10002. This is working OK as I have a network sniffer on my PC and can see...
3
by: Bjørn Eliasen | last post by:
Hi, I have an application running on all pc's in our company. Basically it is a TCPListener awaiting for sockets to connect and on connection performs the required tasks. The app works fine, but...
3
by: Jon Slaughter | last post by:
I can't seem to get these to work over my router. I have all the ports open and ftp works from outside. Is there anything special I have to do or what? (my app does work over the LAN though) I'm...
1
by: Darwin | last post by:
Setting a server to listen on 8080 for incoming connections. Written in VS2005 on a Multi-homed machine. I get the warning: Warning 1 'System.Net.Sockets.TcpListener.TcpListener(int)' is obsolete:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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...

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.