Question:
How do I set my computer up as a server?
2011-04-19 20:19:56 UTC
I am trying to set up my computer as a server, useinng a TCP/IP type connection, Where can I learn more about this.
It would be a simple server , usaully only haveing 2 or 3 clients,...What changes do I need to make in my Firewall settings ? What is the "router", and how do I set port numbers ? If anyone has any info or know where to look that would help,..yes I know google search, bt if anyone knows any specific tutorials, that would be nice.
from Garry
P.S. I am useing this program, made with qb64, but that dose not matter to much, what I need is to learn more about how TCP/IP works,...here is the discussion on the program,
http://www.qb64.net/forum/index.php?topic=3348.msg31723#msg31723
though in case that will help,..but I am not intersted in trying any other programs.
Four answers:
Jared
2011-04-19 20:39:16 UTC
As far as the port goes, you need to know what port the server listens to.



You need to set a static IP for your computer (through your router), NOT ISP...although you do need a static IP if you want to "publish" your server, otherwise it will change and the old IP address will no longer work...I suspect (2 or 3 clients) means you only plan to use this with friends, in which case the non-static public IP isn't that big of a deal...it doesn't change often and when it does, just tell your friends.



But you DO need to have your router assign a static IP for your computer otherwise you will constantly be needing to reset the port forwarding on your router.



Basically, on your router find where it does port forwarding. Go to the routers setup page and you can probably figure where this is...if not check out this for help:



http://portforward.com/



What you want to do is to forward TCP port number (whatever the server listens to) to the IP your router assigns to the computer...that's why it should NOT be using DHCP. That website should also help you in setting up a static IP for your router.



Now I should say, that only ONE client can connect to the server at one time through a single port. There are two different ways to get around this:



1) connect to the server, get the information, then disconnect and then re-connect if you need more information.



2) have the server spawn a new thread that listens on some random port, send the port to the client, then re-connect through that port. I don't know how port-forwarding affects that, it might be that once the client connects to your computer it can use that IP to connect using the different port, or it might be the case that you need to have the server use a range of ports and make sure to forward all of that range (in the router) to your computer.
Shadow Wolf
2011-04-19 21:20:45 UTC
Before you try any of this, make sure you have QB64 downloaded along with the client and server programs. You'll need all 3 to make this work. Then, you may need to compile the programs so that they can be run in a command window. I may be partially wrong on this, as I'm not to familiar with QB64 and from the information that I found, things may even need changed in the programs due to QB64 changes.



Step one, run both programs on your machine. running the client, specify local host or 127.0.0.1 and it should connect with the server program. This will at least tell you if it is working on your computer.



The next step, load the programs for the server onto a 2nd computer, open a command window and enter ipconfig. make a note of the local IP address. On the first computer, start the client and enter the IP address you wrote down. It should connect with the server and work as before.



The final step will be figuring out what ports are used by the program. You'll need these to forward the ports to the server from the firewall/router. Once this is done, you need to make a note of the IP address of the firewall/router. This will be in the connection details as it is assigned by the ISP and may change every so often. Give this IP address to anyone with the client and they can connect to your server if it isn't blocked by your ISP for some reason.



The IP address from ipconfig is the local network address and not the one people need to connect to your computer from outside of your local network.



I highly suggest that you learn more about networks and how they are connected. Even what I wrote here may be confusing. You need to find out a lot of things that I can't directly help you with since I don't know what you have and how everything is connected.



It would almost be easier to tell you to grab a live Linux distro and have you run a simple web server locally.



Shadow Wolf
2011-04-19 20:30:29 UTC
Hello, i can help a bit...I designed my own webpage but i use a program for hosting it...it's pretty simple...your firewall might need to be disable and you need to open up a port on your router..so when you connect to it it will have a ip then the port number for example: http://183.34.43.2:1000 after semicolon is the port number...I only did one webpage..this is what i used: http://www.rejetto.com/hfs/ look it up..because your trying to do more than one site, i will consider using a virtual pc..in this way you can get server 2008 free from microsoft and install it on your virtual computer and be able to do more than one site...with that application that i use it can only be use for one, i haven't tried for more than one..to set your port numbers you need to log in into your router for example in att is http://homeportal and it will take you in there...if your using a linksys or other u need an IP to enter to your router and set up your port..well, this is just a basic general idea of it...if you keep on looking it up might be able to find more info...I also used dreamweaver CS5 for design my webpage..
pat
2016-10-27 11:04:53 UTC
merely any previous community, have a public shared folder on between the computers and grants get entry to..to handle something extra particular you ought to setup sharing for each person call interior the folder you want to share..or flow down the line of a lively listing login device. from that you'll manage person permissions with the help of putting them into communities and different issues.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...