Article View: borland.public.cppbuilder.internet.socket
Article #1507Re: Socket Connections through the Web and a router using NAT?
From: Remy Lebeau (TeamB)
Date: Wed, 10 Jan 2007 18:58
Date: Wed, 10 Jan 2007 18:58
29 lines
2326 bytes
2326 bytes
"Chris" <computer@programmer.com> wrote in message news:45a5011b$1@newsgroups.borland.com... > I have a Server Socket Program and I have a Client Socket > program. On my LAN these two programs work like a charm, but > when I try to access my Server Socket from a computer outside > of the Network(over the internet) I get an error: As you should be. Your client needs to connect to the router's public IP/Port, not the server's private IP/port. And the router needs to be configured for port forwarding as well. Which it sounds like you are doing, so something else has to be blocking the connection. > On the router, which is the only firewall we are using, we use port > forwarding to connect to the ServerSocket computer. Therefore the > address of 123.45.67.89:6111 should connect me to 192.168.1.17 > from outside of the LAN. This does, in fact, work for other programs > like Ultra VNC, but not for my SocketServer program. Then you are doing something else wrong. Make sure that your client really is trying to connect to 123.45.67.89:6111 and not 192.168.1.17:6111, and that the SocketSever program really is listening on 192.168.1.17 on the port that is being forwarded to. What kind of server socket component are you using (if any)? How are you binding it when starting to listen for connections? Gambit
Technical Details
Message-ID:
<45a5373f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45a5011b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f2ef1bbb95928174 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <45a5011b$1@newsgroups.borland.com> Subject: Re: Socket Connections through the Web and a router using NAT? Date: Wed, 10 Jan 2007 10:58:03 -0800 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.34.171 Message-ID: <45a5373f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1168455487 75.83.34.171 (10 Jan 2007 10:58:07 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail