|
-
Jul 10th, 2007, 07:02 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] connecting over internet - client/server IM
My problem lies with being able to connect to another computer that isn't in the LAN. It's over the internet. My program works fine with my two PCs in the same subnet of 192.168.x.x. At one point in time, I was able to connect to my friend who is helping me test this IM program over the internet using their public ip. But now, I can't seem to connect to her. None of her settings have changed. I did find out today that she does have a linksys router between her pc & dsl modem. However, she had the same configuration before and I know she hasn't changed any settings in her router because she doesn't even know how to get in it. I also had her turn off her windows firewall (I make sure she turns it back on after testing). I can't connect to her and it's mysterious how I managed to connect to her the first time and now I can't.
My program listens on port 33221. Now I know she receives a private IP through dhcp because when I have her run ipconfig, it's the 192.168.x.x address. I have even had her put the program on her other pc and it works on her LAN. So the program is listening but my connect request never gets to her. When I try to listen on my end and have her connect, the same thing happens. It never connects. It seems it's only listening on the LAN and not from outside internet connections. I have NAT on my modem but the firewall is disabled. Shouldn't she be able to connect to me?
How can I tell my program to tell the public IP that the private address 192 is listening for a connection and to forward it to that private ip so a connection can be made?
I know NAT/proxy servers only allow connections to be made to their internal ip's if the internal ip requested something. Well, isn't listening sort of a request? Like I said, the program did work once but now it won't. What do I need to do to make it work on a pc on the internet?
Last edited by drivenbywhat; Jul 10th, 2007 at 07:07 PM.
[vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you. 
-
Jul 10th, 2007, 08:58 PM
#2
Thread Starter
Fanatic Member
Re: [RESOLVED] connecting over internet - client/server IM
Well, I fixed the problem by configure port forwarding on my layer 3 switch. However, I still can't figure out how I got my friend to connect to me the first time when I hadn't configured port fowarding, but oh well. Mysteries will be mysteries.
[vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you. 
-
Jul 18th, 2007, 04:16 PM
#3
Re: [RESOLVED] connecting over internet - client/server IM
You must have had one port forwarded to the IP your computer leased that one time. The next time you turned the computer on it got a different IP, so the forwarding didn't work. Always use a static IP on computers that have ports forwarded to them.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 18th, 2007, 07:34 PM
#4
Thread Starter
Fanatic Member
Re: [RESOLVED] connecting over internet - client/server IM
No, that's not it. My DHCP is set up give IPs based on reservations I have set up. The addresses have not changed in months. Even if for some odd reason my IPs weren't static, my port forwarding had never been set up before. I just recently did it when I was having this problem. When I first accessed it, there were no ports configured to be forward. So, it still remains a mystery.
[vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you. 
-
Jul 19th, 2007, 04:59 PM
#5
Re: [RESOLVED] connecting over internet - client/server IM
If there are no ports forwarded, it's impossible for a computer behind the NAT to be connected to - what IP does the NAT send the packet to? Also, some routers just won't forward packets to leased addresses - which is really a good idea.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 19th, 2007, 09:34 PM
#6
Thread Starter
Fanatic Member
Re: [RESOLVED] connecting over internet - client/server IM
I know it seems impossible but it happened! Like I said, it worked one time. Then when I tried later on and other days, it didn't work. The ip that is being forward to is my lan ip 192.168.0.4, which I've reserved for the MAC address of my laptop.
It's a mystery and the only logical explanation, though a bit far-fetched, is that it was a fluke in the router and at that one time, it let the packets through and forwarded it to my laptop, which was the only pc on at that time.
[vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|