Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: vector on October 21, 2008, 07:58 PM

Title: Problem getting Server to accept connections from outside network
Post by: vector on October 21, 2008, 07:58 PM
I have a server that I made (VectorNet), and it won't accept any connections from outside the network, and I'm wondering what on earth is going on.

I invoked .Listen on the listening socket, and yes, I set the protocol to sckTCPProtocol

I forwarded the port the Server listens on from the router, and added an exception to it on the firewall, and no beans.

From a client plugin:

Quote
[05:55:10 PM] [VectorNet] Socket error #10061: Connection is forcefully rejected

that's when I attempt to connect to the no-ip DNS host that goes back to my computer.

What gives?
Title: Re: Problem getting Server to accept connections from outside network
Post by: Barabajagal on October 21, 2008, 10:47 PM
What port are you using, and are you sure your ISP doesn't block that port?
Title: Re: Problem getting Server to accept connections from outside network
Post by: Sixen on October 22, 2008, 12:38 AM
In addition to what Andy said, you will need to make sure your router/firewall(s) are configured for that port.
Title: Re: Problem getting Server to accept connections from outside network
Post by: vector on October 22, 2008, 12:40 AM
the port is 1337. I have made an exception on the firewall, and forwarded the port.

Would the ISP ban a port that is not specifically defined in their "custom program port" lists?

I have Verizon FioS
Title: Re: Problem getting Server to accept connections from outside network
Post by: Yegg on October 22, 2008, 12:46 AM
Did you bother trying other posts? Just try 30000 or something. I vaguely remember for certain types of connections that you couldn't have under a certain number, and I think 1337 would be included. Just something I vaguely remember reading however, so it's not necessarily true.
Title: Re: Problem getting Server to accept connections from outside network
Post by: Spht on October 22, 2008, 01:20 PM
Did you remember to register the connection with WSAAsyncSelect?  Assuming you're using the winsock control that comes with vb6, it's pretty easy--just .accept on ConnectionRequest
Title: Re: Problem getting Server to accept connections from outside network
Post by: Dale on October 22, 2008, 10:42 PM
What kind of router do you have? I had this similar problem but I solved it.
Title: Re: Problem getting Server to accept connections from outside network
Post by: vector on October 23, 2008, 09:39 AM
Quote from: Spht on October 22, 2008, 01:20 PM
Did you remember to register the connection with WSAAsyncSelect?  Assuming you're using the winsock control that comes with vb6, it's pretty easy--just .accept on ConnectionRequest
Yes..

@Dale: I don't know if this helps

Quote
Firmware Version: 4.0.16.1.45.160.27
Model Name: MI424-WR

What did you do?
Title: Re: Problem getting Server to accept connections from outside network
Post by: Dale on October 23, 2008, 12:18 PM
Quote from: vector on October 23, 2008, 09:39 AM
Quote from: Spht on October 22, 2008, 01:20 PM
Did you remember to register the connection with WSAAsyncSelect?  Assuming you're using the winsock control that comes with vb6, it's pretty easy--just .accept on ConnectionRequest
Yes..


@Dale: I don't know if this helps

Quote
Firmware Version: 4.0.16.1.45.160.27
Model Name: MI424-WR

What did you do?

Well I have a linksys router, I don't know how many are setup this way:

(http://img390.imageshack.us/img390/6929/mehfl5.jpg)

I was putting 192.168.1.100 any none of my shit would forward properly, then I somehow got the idea to try 192.168.1.101 and they're forwarded and my server works. So maybe you think you forwarded your ports correctly but didnt?
Title: Re: Problem getting Server to accept connections from outside network
Post by: vector on October 24, 2008, 03:35 AM
That would be rather funny if I forwarded the port to the computer I'm not using =/

Well, in the past I've hoted a JBLS server, and that worked fine. In the future, I plan to have a dedicated JBLS, if I can keep the computer on for that long :)
Title: Re: Problem getting Server to accept connections from outside network
Post by: vector on November 24, 2008, 01:25 AM
I tested it out today on my home network.

I was able to accept connections from two people, since they were the only ones who I gave the VNClient.exe to. Zone, one of my friends, as well as DeaN o.o
Title: Re: Problem getting Server to accept connections from outside network
Post by: vector on December 02, 2008, 07:29 PM
I was going through my code, and managed to fix all problems that related to crashing both the client and the server.

I just have to be more careful in VB6 with handling multiple sockets.

But, all is good.

Thanks for helping, guys.