Garry's Mod

Garry's Mod

Not enough ratings
How to forward ports for a Gmod dedicated server
By Kothana
This guide continues on from my guide on how to make a gmod dedicated server.
   
Award
Favorite
Favorited
Unfavorite
Port Forwarding
Now, the very first step for this is finding your Default Gateway Address. Unfortunately, i can only give instructions on this in Windows Operating Systems; OSX (Mac) and Linux are completely unknown to me. Firstly, open the command prompt program (for a shortcut, press Windows+R and type "cmd" (without quotes) into the box that opens). Now, type in "ipconfig", it should come up with a lot of text. The only thing we are interested in at the moment is the "Default Gateway". It should be something like ***.***.*.* (replacing the *s with numbers).

Once you have these numbers, open your preferred internet browser (Internet Explorer, Google Chrome, Firefox etc.) and type these numbers into the address bar. Leave cmd open, we'll need it later.

It should ask you for a username and password. By default, the username is "admin" and the password is "password" (of course, without quotes). If someone has changed this, you will either have to ask someone on your network or guess it. If "admin" and "password" have worked, it should come up with a menu of different options.

On the left-hand side it should have more options, locate and select the one that says "Port Forwarding". It should come up with a table of options. In a section called "Add new forwarding rule", it has a table of things for the ports. For the title of this new forwarding "rule", type "gmodserver". Next it should have "Starting Port" and "Ending Port", set both of these to "27015".
Next, it should have a "protocol" selection menu. Click on the drop down list and select "UDP". Now, if you have followed these instructions correctly and there have been no incompatibilities between your modem/router and these instructions, there should be one section left, "Local IP Address". (If there are any problems with this part and you'd like to send me a bug report, do NOT type in the specific numbers for yours.) Reopen cmd if you closed it, and look for the part that says "IPv4 Address" (it might say "IPv6", depending on your PC).
Ignore the main numbers, just take the last number and put it into the box in "Local IP Address" in your internet browser. Now, if all of these instructions are compatible with your modem/router, click "Add". If successful, you have just forwarded your port!
Starting the server
Now, for the final and most simple part of this guide: actually starting and configuring the server! Open the server program you downloaded in my last guide and simply make sure the "UDP Port" section says "27015" (This will not work if you have the server program open on this port already). After this, the server is completely yours! Have fun, and may your server one day become famous!
25 Comments
Kothana  [author] Jun 29, 2020 @ 5:02pm 
Nah, the UDP Port is on the server software when you go to run it, it comes up with a dialogue to confirm details
It might also be in a config file, not sure on that one
Though, this guide is a bit old, and the software might have changed since i last used it, in which case I can't help much, sorry
gört Jun 29, 2020 @ 12:19pm 
Hey man,
About the last part, I don't understand where I am supposed to find the "UDP PORT"-section.
Is this in the server.cfg or something like that?
TESTICULAR TORSION WIZARD May 15, 2020 @ 2:57pm 
i still don't see my server on the list
Kothana  [author] Apr 10, 2020 @ 8:31am 
I'm not 100% sure, but 9 times out of 10, the same port works in both. It's nearly 2am where I am at the moment (sorry for late response btw, didn't see this till now) so if that doesn't work, let me know and I'll find out for you when I'm not nearly asleep
Slick Wine Apr 9, 2020 @ 11:33am 
I have an external start/end port and local start/end. What do I do?
Kothana  [author] Feb 26, 2020 @ 2:15pm 
UDP, as @Bigbaddevil7 explained below TCP can cause some latency and other such problems
Sovayer_1337 Feb 26, 2020 @ 5:18am 
Should it be UDP, TCP, or both? in your opinon
Kothana  [author] Feb 24, 2020 @ 4:56pm 
6. Below that, set all the port boxes (Start and End of both External and Internal, and the sources) to 27015
7. Set the protocol drop-down box to UDP
8. In the mapping name, you can set a name for this rule, such as 'gmodserver' or something else, this is just a label and you can make it whatever you want.
9. Next is the Internal Host box, which you should put in the IPv4 number you got from CMD, same as for the "Local IP Address" box on other devices like I described above.
10. Hit apply to save this rule.
Hope this helped, I've personally got very little experience with your device so unfortunately I might not be able to help much beyond that, but google can be a surprisingly good resource if you do have any more trouble.
Kothana  [author] Feb 24, 2020 @ 4:55pm 
Well up until the part where you get to your router/modem's page, it should be the same as any other, but after that point:
1. You'll be given a login screen (default username is "root" and default password is "admin")
2. It should default to the "Device Information" menu on the left, but in case it doesn't, click on that.
3. Along the top of the menu you will see a "Forward Rules" tab, click on that.
4. Here there's a table with all the currently active forwarded ports, and a menu to enter a new one.
5. In that lower menu, select the "WAN Name" drop-down box to choose an available connection.
Kothana  [author] Feb 24, 2020 @ 4:55pm 
I'm gonna have to split this into like 2 comments cuz steam doesn't like it being too long, but gimme a second and I'll post some steps for you