Windows 2000/TCP port blocked?

Started by
8 comments, last by Xserv 22 years, 6 months ago
Hey all! OK, here is my situation. hope someone reading can help me out because i cant find anything online that points out my problem. i have made a client/server program using winsock. i have a chat client and a server. everything was/is fine if the server is running on windows 98. i put the server on a second computer running windows 2000 server and noone can connect. i am guessing 2000 is blocking all ports except the ones it has set open. is this why clients cant connect to my server on port 19000? can i set 2000 up to open port 19000? am i missing the whole problem here? any help appreciated! Xserv
Advertisement
I think you are missing the problem. Windows 2000 doesn''t block any ports if a server specifically opens a port on that machine.
There should be, in general, no difference between a server that runs on 98 and 2000 when it comes to creating a socket and binding it to an IP/port.

You should attempt to debug the server under Windows 2000 to see what you may have done wrong.





Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
all winsock calls are completing without problem or error.

i ran 2 clients on the same 2000 machine and it all connects, sends, and receives fine between client and server. just noone outside can connect when the server is running on Windows 2000. Windows 2000 Server must do something to block outside connections. i have a machine running windows 98 and one running windows 2000 Server both running on a DSL, both with individual IPs. no firewalls, no proxies, nothing. when running on 98 it allows people to connect just fine.

the windows 98 machine can connect through the network but any attempts outside the network via dial-up or otherwise fail. the windows 2000 machine has a fresh install of windows 2000 server with SP2 installed. only basics installed, no IIS etc. i''ll keep investigating but i am pretty sure its 2000 disallowing connections.
I had that problem as well. It''s in Connection Sharing properties I think that you can change what ports (UDP, TCP) are allowed through. I never figured it out though for DPlay. Winsock may be a little easier. I forget the search terms I used to find info on it. "Windows 2000 port permissions" should probably do it though. Just use Google. Or you could look up how to host Unreal Tournament behind a NAT. That will also give you info since it''s the same issue.

I opted instead to buy a Netgear RT311 and not use Connection Sharing. If you have an internal modem that won''t work though.

Ben

[Icarus Independent | Jump Down The Rabbithole | Tombstone: Vendetta ]
thanks for the response KalvinB. i dont think its a connection sharing though. i have a DSL modem going into a NetGear 4 port hub. the 2 systems are connected to the hub. they are setup with their own individual IPs. no firewalls, routers, or anything. direct connections to the internet and it all works fine from windows 98 just not windows 2000 server.
Is there anyway to program your Netgear to specify what ports go to what IPs?

Each of the significant computers on my NAT have a static 192.168.0.* IP. The router can then be programed to send any requests to a specific port through my outside IP to a specific computer behind the NAT. All port 80 requests go to my web-sever computer. All DPlay port requests go to the game sever computer.

If all else fails check the Netgear website. They might have an answer.

The reason 98 works and 2000 doesn''t is because 2000 has far more restrictions when it comes to getting access to it remotly. When I had WinMe running the NAT in software I had complete freedom in running my server on any computer. When I switched to 2000 I had to run the server on the 2000 machine.

Ben

[Icarus Independent | Jump Down The Rabbithole | Tombstone: Vendetta ]
naw, its just a normal run of the mill network 4 port hub. im not using any firewall/router boxes on the DSL. comes into the DSL modem, runs directly to the network hub. both machines are hooked up to the hub just like a normal network. but 98 can only access my server program on the network when its on 2000. noone on the internet can reach it. both machines have internet IPs, not internal network IPs like 192.168.0.* etc.

i am pretty sure 2000 server is keeping outside connections from coming in. but i keep searching google and microsoft in hopes of finding some clues to how to open this up for my port. any 2000 experts out there? anyone know any resources? thanks for all suggestions thus far.

You should use a port scanner on your machine to see what's available even if you think you opened a port up.. then troubleshoot from there


Also see if your hub supports a loopback to the same device.. (no not 127.0.0.1 =)).. I had problems because mine did not support loopback to the same device.

Edited by - GoofProg on September 30, 2001 12:51:36 AM

Edited by - GoofProg on September 30, 2001 12:54:58 AM

The nightmare travels across the cosmos with his burning mane. The trail of ash that is produced.

?Have a nice day!?

OK, after some snooping and thinking i have come to a possible conclusion. i think Dire.Wolf may be half right in that 2000 isnt blocking any port. for an example i downloaded AIM and set the port in AIM to be the same as i am using for my program and it worked fine. it may work differently but in the basics it was not blocking any port i changed it to.

now if its not blocking but my program is working via the LAN but not via the internet than my guess would be something changed in the winsock code for 2000. i do not have the updated platform SDK that includes 2000 changes. so i am not 100% sure of any of that. i will attempt updating my SDKs and look into this some more then. any futher information or suggestions are still welcome.
Try this:

Run your program under Windows 2000. Once it is running and listening on a port go to the command prompt and type:

netstat -a

That will list all open connections on that machine. Look for a connection on your machine in the LISTENING state on the port you specified. If it isn't there you obviously have a problem

Which accept call are you using? AcceptEx, accept, or WSAAccept? Are you setting the sockets to non-blocking or blocking? Are you messing with any of the I/O control options?

If all that fails maybe you can post some source code. If you don't want to post it you can send it to me. I have a Win2K SP2 setup and could test it very quickly. Unfortunately, I don't accept executables - source only

BTW If you are using Visual C++ to write you app you can try this. When debugging go to the watch window and add the following:

@err, hr
@err

The first watch will return the last error (GetLastError()) and automatically lookup the error for you (like FormatMessage()). The second one will return the last error code without looking it up. This might be helpful.

Good luck.

My email is in my sig.


Dire Wolf
www.digitalfiends.com

Edited by - Dire.Wolf on October 3, 2001 11:20:14 AM
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com

This topic is closed to new replies.

Advertisement