Connecting Tech Pros Worldwide Help | Site Map

server keeps rejecting tcp connections!

Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#1: Jan 6 '09
i created a program in VB.NET that connects with tcp to a server... the problem i have is my server keeps rejecting the connections... i have no skill in networkin and i need some help, its probably something very basic but i still cant figure it out... im pretty sure its not my code although it is possible that i overlooked something else simple in my code. Any help would be greatly appreciated! thanks in advance
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,147
#2: Jan 6 '09

re: server keeps rejecting tcp connections!


What sort of server? Is it expecting some sort of authentication?
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#3: Jan 7 '09

re: server keeps rejecting tcp connections!


i have server 2003 on it. my router port fowards everything from port 5136, the port i use, to the server.
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,147
#4: Jan 7 '09

re: server keeps rejecting tcp connections!


Yes that is the OS you are using but what server software are you running that is going to respond to the incoming connection request?
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#5: Jan 8 '09

re: server keeps rejecting tcp connections!


some software i made myself it just listens to a tcp port for any incoming connections on port 5136, but the server keeps rejecting the connections, i cant even connect to it from inside my network. sorry im not very good at networking.
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,147
#6: Jan 8 '09

re: server keeps rejecting tcp connections!


OK, does you server software output and status messages or is it supposed to if you get any connections?

Do you have a firewall running on the server? If so have you opened port 5136 to allow incoming connections in the servers firewall? Actually the simplest way to tell if the firewall is a problem is to (very) temporarily disable it. Then if you connection works you know it is the firewall and you can set about finding out how to configure it.

Can you ping the server? Making sure you use the same address your .NET program uses.
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#7: Jan 9 '09

re: server keeps rejecting tcp connections!


thanks for the suggestion i really appreciate it... i was able to ping it and it worked. i dont know if i have any firewall software set up on it, i didnt actually setup the server. is there any way i could detect if i have a firewall setup?
thanks for helping me so far, i really do appreciate it
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#8: Jan 9 '09

re: server keeps rejecting tcp connections!


Quote:

Originally Posted by raids51 View Post

thanks for the suggestion i really appreciate it... i was able to ping it and it worked. i dont know if i have any firewall software set up on it, i didnt actually setup the server. is there any way i could detect if i have a firewall setup?
thanks for helping me so far, i really do appreciate it

In the control panel on your server, click on the windows firewall icon. If the firewall is on then click on the exceptions tab, then select add port. Add a name for your exception and your port number and apply your changes.

If you are connecting to your network throuh a router you will most likly have to open a port in it's nat firewall. With most routers you can administer them via http by typing 192.168.0.1 into your web browser.
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#9: Jan 9 '09

re: server keeps rejecting tcp connections!


i already have my router setup to portfoward 5136, so i am guessing its my servers firewall, ill check it later tonight when i have time
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#10: Jan 13 '09

re: server keeps rejecting tcp connections!


alright so i finally got some time to check up on my server, when i try to open windows firewall i get an error... something about it not being able to use ipnat.sys... also if it helps the error i get from my application says that the server kept on refusing the connection. any ideas?
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#11: Jan 13 '09

re: server keeps rejecting tcp connections!


That means that you are not using the Window Firewall. Most likely you have RRAS enabled on the server which is using ipnat.sys. If that's the case you will have to look into the configuration of your RRAS to enable access
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#12: Jan 13 '09

re: server keeps rejecting tcp connections!


yea i do have it enabled, but im not very good with servers, could you tell me how to enable access?
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#13: Jan 14 '09

re: server keeps rejecting tcp connections!


I'm affraid I don't have any experiance using RRAS myself except in turning the service off to use firewall. Maybe someone else could help you there.
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#14: Jan 14 '09

re: server keeps rejecting tcp connections!


so if RRAS is on does that mean that i cant have firewall running?
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#15: Jan 15 '09

re: server keeps rejecting tcp connections!


Correct. Your windows firewall would need to have use of ipnat.sys but if RRAS is using it, it won't be able to start. Now RRAS will act as sort of a basic firewall if you want to setup exceptions on it to block ports, but it should be by no means your only means of protection. The Firewall on your router should be eanbled and then you use port forwarding to direct your required incomming ports to the server. If the application that you are using requires an ICMP responce from your server you may also have to enable it on your router.
Member
 
Join Date: Nov 2007
Location: Alberta, Canada
Posts: 59
#16: Jan 16 '09

re: server keeps rejecting tcp connections!


hmm... well i cant see why it keeps rejecting connections...
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#17: Jan 16 '09

re: server keeps rejecting tcp connections!


You could try to do an online port scan from your server to see if that port is actually open. Just type something like "Firewall Test" into google and you can find some sites that will do a port scan to see what is open.

If the port shows as open then it's probally a problem with your program, if not then you are going to have to dig more into why the port is still blocked.
Reply


Similar Networking bytes