Setting up a Server?

Started by
3 comments, last by hpesoj 19 years, 2 months ago
I am currently using a dll that uses winsock for networking. The dll is simplified so that setting up a server is done by a function like (HOST ip). I can set up a LAN server between my two PCs using the ip 192.168.0.1 etc. but my global IP (I'm sure it is correct) just doesn't want to connect and gives an error 10049. http://support.ipswitch.com/kb/WSK-19980701-EM04.htm My two computers are linked together through a router, which is connected to the internet, and I'm wondering if there are any technicalities when using this kind of connection (maybe it's screwing up because both pcs share an IP address?). Google-ing about the situation, I have come up with various non-sensicle piles of technical stuff (IP forwarding?) but none of it I understand (I'm rather new to networking in general). I have disabled the windows firewall (WinXP sp2) as there is one built into the router, but that shouldn't create any problems with setting up a server should it? Just when people want to connect to the server. I have spoken to other people using the same dll and they can set up a server without a hitch, but then they aren't using a LAN. Thanks for any help :).
Joseph Thomson - CLS Productions
Advertisement
When trying to connect from your LAN you have to use your local IP (192.168...)
Trying your global (that is the IP adress your ROUTER has) will not connect to your PC as your doesn't know that adress, only the router does.

So, the external IP has to be used from external (that is from the internet, not LAN).
When connecting inside the LAN you have to use the local (192.168...) IP.

For testing: Ask a friend to connect to your host, that will show you if it works. (when doing so watch your firewall settings and port-forwarding of your router).

hope this helped.
-----The scheduled downtime is omitted cause of technical problems.
As OmniBrain said, you need to enable port forwarding on your router. Say your LAN ip is 192.168.0.3 and your server operates on the port range 5000-6000, you setup you router to forward incoming requests from this port range to the local address 192.168.0.3.
How exactly this has to be done depends on your router but most likely it will have a web interface for administration that you can reach browsing to 192.168.0.1.
Thanks for the tips :). I think I've found what I need for my router...

http://www.portforward.com/belkin/f5d6230-3-portforwarding.htm

But unfortunately my Dad set up the network, so I don't know the username or password. I'll have to wait till be gets home till I can test it out. I'll post again once I've tried :).
Joseph Thomson - CLS Productions
Ok, I now have it working :). Thanks guys. Only thing is, I have to disable DoS protection on the router firewall to allow connections. As far as I can tell, DoS protection just stops people flooding your pc with information and using up all the resources. This seems kind of a crude method, and I'd think there'd be an easier way.

The settings of my firewall are:

Max Half open TCP Conn. 25%
Max ICMP Conn. 25%
Max Single Host Conn. 75%

And these are described as...

Max Half open TCP Connection: Sets the percentage of concurrent IP sessions that can be in the half-open state. In ordinary TCP communication, packets are in the half-open state only briefly as a connection is being initiated; the state changes to active when packets are being exchanged, or closed when the exchange is complete. TCP connections in the half-open state can use up the available IP sessions. If the percentage is exceeded, then the half-open sessions will be closed and replaced with new sessions as they are initiated.

Max ICMP Connection: Sets the percentage of concurrent IP sessions that can be used for ICMP messages. If the percentage is exceeded, then older ICMP IP sessions will be replaced by new sessions as the are initiated.

Max Single Host Connection: Sets the percentage of concurrent IP session that can originate from a single computer. This percentage should take into account the number of hosts on the LAN.

Any help again would be greatly appreciated :).
Joseph Thomson - CLS Productions

This topic is closed to new replies.

Advertisement