09-04-2006, 12:48 PM
Post: #1 Tutorial: router configuration and ip's explained.
How to configure routers to work with srcds?
First of all you need to understand the difference between external and lan ip addresses. When running a srcds with behind a router your server console will appear with the "LAN" ip. This will be the ip that anyone on the local network (sharing the same router) will connect to. To find what your external ip is go to whatismyip.com .
That is whats known as your external ip, or the ip that will take internet users to your house, through your router, and to wherever the router will allow it to go from there.
Now this brings you to whats called port forwarding. Basically its telling your router that anyone that trys to connect from outside the local network to inside on a specific port to go here. Here being your game server.
While this can not go into detail on specific routers (due to the fact theres hundreds), but I can however direct you to a site that covers just about every router made. That site can be found here = http://www.portforward.com/routers.htm
The basics though:
1. You will have to connect to your router, usually done by going to the URL http://192.168.1.1 (which would be the ip of the router itself) It will ask you for a logon, which varies greatly from router to router, I know most linksys routers are blank username and admin as the password by default. Some routers are just blank, some are admin for username and password. That site stated above should cover that, or try looking in your routers documentation, or there support section on there website.
2. This part is very differen't from router to router, but somewhere there should be a section on port forwarding. I know on my Linksys this is under the applications and gaming section. Here you will have to add port 27015 (or whatever you have your server set to) in tcp and udp to be forwarded to the computer running the servers lan ip address.
3. With that done your basically done (givin you have sv_lan set to 0 in the server), its pretty simple. The hard part can be trying to figure out how to forward ports on your router. If the site above doesn't cover your router, check your routers documentation. You can find just about everything you would ever want to know there. If you don't know where that is, check your router manufacturer site. They will most always have documentation availble for download.
*NOTE*
There is kind of a "bad router" list out there. Well more like a bad router firmware list. Most of the time routers that aren't handleing a server and port forwarding right can be fixed by downgrading the firmware. Here is a link to a page on steampowered.com about this list of bad router firmware. Steampowered.com
Ok, more about your external ip. Chances are if you don't know what a static ip is, your external ip (as stated in the above image) is whats called a dynamic ip. A dynamic ip means that from time to time it will change, because it is assigned your your isp's dhcp server. This means when your router loses connection to your isp's server for any reason at all, there is a chance on your ip changing. Which can really stink if your server has a following, because the server will seem down in there favorites after the ip changes. Usually you can get whats called a "static ip" from your isp. Meaning that no matter what, your external ip will stay the same. You isp will of course probly charge you a small fee for this.
There is one other option available, its not near as good, but it is free! You can use a dynamic dns service. Like at http://www.dynu.com you can make an account, and you will have to install a little piece of software, and basically if your external ip ever changes it will automatically update your dynu url, which will be in the format "yourname.dynu.com" so you would be able to connect to that (attaching your port at the end of course). But with this if your ip changes, your server followers will still have to re-add this dynamic url into there server favorites, so still makes it.. a pain.
*Another Note*
You should note that your servers lan ip should be made static, because if that ip changes it will make your forwarded ports direct to the wrong area, making them useless, and your server dead. For instructions on how to make the lan ip static, read on below for a how to in Windows XP and later.
How To Make the LAN IP Static-
1. You first need to find out the current IP settings for the computer that are assigned by the local DHCP server. To do this click start -> run. Type in "CMD" and press "enter". Then in the command prompt window type in "ipconfig /all" (without the quotes). Then take note of the ip address, subnet mask, default gateway, and the 2 dns servers (there maybe more, usually just 2 though, or sometimes only 1. however many there happen to be, use them all).
2. With all that written down go to start -> control panel then click on "network connections", or if you have catagory view enabled click on "network and internet connections -> network connections"
3. There should be an icon in that window that says "local area connectiong". Right-click on that and click properties. Then click on "internet protocol [TCP/IP]" and click properties.
4. Then click the bullit next to "Use the Following IP address" and fill in the information you noted earlier. Then click ok, and ok again. It should then be effective that your LAN ip is static for that computer.
If this makes you not able to connect to the internet at all, please make sure you copied the information right, try starting with step 2 and setting it back to "obtain ip address automatically" and starting over from step one to make sure you copied everyting exactly how it was.
*NOTE*
Do NOT try to put your external ip in the ip field, that will make any other computers on the local network lose internet, if it will work at all.
How to configure routers to work with srcds?
First of all you need to understand the difference between external and lan ip addresses. When running a srcds with behind a router your server console will appear with the "LAN" ip. This will be the ip that anyone on the local network (sharing the same router) will connect to. To find what your external ip is go to whatismyip.com .
That is whats known as your external ip, or the ip that will take internet users to your house, through your router, and to wherever the router will allow it to go from there.
Now this brings you to whats called port forwarding. Basically its telling your router that anyone that trys to connect from outside the local network to inside on a specific port to go here. Here being your game server.
While this can not go into detail on specific routers (due to the fact theres hundreds), but I can however direct you to a site that covers just about every router made. That site can be found here = http://www.portforward.com/routers.htm
The basics though:
1. You will have to connect to your router, usually done by going to the URL http://192.168.1.1 (which would be the ip of the router itself) It will ask you for a logon, which varies greatly from router to router, I know most linksys routers are blank username and admin as the password by default. Some routers are just blank, some are admin for username and password. That site stated above should cover that, or try looking in your routers documentation, or there support section on there website.
2. This part is very differen't from router to router, but somewhere there should be a section on port forwarding. I know on my Linksys this is under the applications and gaming section. Here you will have to add port 27015 (or whatever you have your server set to) in tcp and udp to be forwarded to the computer running the servers lan ip address.
3. With that done your basically done (givin you have sv_lan set to 0 in the server), its pretty simple. The hard part can be trying to figure out how to forward ports on your router. If the site above doesn't cover your router, check your routers documentation. You can find just about everything you would ever want to know there. If you don't know where that is, check your router manufacturer site. They will most always have documentation availble for download.
*NOTE*
There is kind of a "bad router" list out there. Well more like a bad router firmware list. Most of the time routers that aren't handleing a server and port forwarding right can be fixed by downgrading the firmware. Here is a link to a page on steampowered.com about this list of bad router firmware. Steampowered.com
Ok, more about your external ip. Chances are if you don't know what a static ip is, your external ip (as stated in the above image) is whats called a dynamic ip. A dynamic ip means that from time to time it will change, because it is assigned your your isp's dhcp server. This means when your router loses connection to your isp's server for any reason at all, there is a chance on your ip changing. Which can really stink if your server has a following, because the server will seem down in there favorites after the ip changes. Usually you can get whats called a "static ip" from your isp. Meaning that no matter what, your external ip will stay the same. You isp will of course probly charge you a small fee for this.
There is one other option available, its not near as good, but it is free! You can use a dynamic dns service. Like at http://www.dynu.com you can make an account, and you will have to install a little piece of software, and basically if your external ip ever changes it will automatically update your dynu url, which will be in the format "yourname.dynu.com" so you would be able to connect to that (attaching your port at the end of course). But with this if your ip changes, your server followers will still have to re-add this dynamic url into there server favorites, so still makes it.. a pain.
*Another Note*
You should note that your servers lan ip should be made static, because if that ip changes it will make your forwarded ports direct to the wrong area, making them useless, and your server dead. For instructions on how to make the lan ip static, read on below for a how to in Windows XP and later.
How To Make the LAN IP Static-
1. You first need to find out the current IP settings for the computer that are assigned by the local DHCP server. To do this click start -> run. Type in "CMD" and press "enter". Then in the command prompt window type in "ipconfig /all" (without the quotes). Then take note of the ip address, subnet mask, default gateway, and the 2 dns servers (there maybe more, usually just 2 though, or sometimes only 1. however many there happen to be, use them all).
2. With all that written down go to start -> control panel then click on "network connections", or if you have catagory view enabled click on "network and internet connections -> network connections"
3. There should be an icon in that window that says "local area connectiong". Right-click on that and click properties. Then click on "internet protocol [TCP/IP]" and click properties.
4. Then click the bullit next to "Use the Following IP address" and fill in the information you noted earlier. Then click ok, and ok again. It should then be effective that your LAN ip is static for that computer.
If this makes you not able to connect to the internet at all, please make sure you copied the information right, try starting with step 2 and setting it back to "obtain ip address automatically" and starting over from step one to make sure you copied everyting exactly how it was.
*NOTE*
Do NOT try to put your external ip in the ip field, that will make any other computers on the local network lose internet, if it will work at all.