Couldn't allocate any server IP port

Hey guys,

When I attempt to join my server I get this error. I am running a dedicated server on my computer and want to join it on this same computer. It worked before, but now it doesn’t. What’s up? This is the first time I have started into Garry’s Mod for months and it did work a few months ago but now it doesn’t work.

I have followed the srcds wiki instructions thoroughly and sequentially. I did not extract my garrysmod.gcf, I downloaded it with cmd. I extracted all of the needed .gcf files from my steamapps folder to by D:/srcds folder. I made a .bat file for launching it and I have tried using ServerChecker v3.0 with no avail.

When I join the server it just says “Couldn’t allocate any server IP port”

I have tried looking for it in the LAN list, it isn’t there. It also is not in the Internet list. I try connecting with “connect <lan ip>” and “connect <internet ip>” without the “<” and “>” of course, and it still won’t work right, as I get the error again.

My firewall is giving srcds.exe full access, and I also opened my firewall ports on the computer of 27015, both TCP and UDP.

My LAN adapter settings have my computer have a static LAN address of

My router settings are as follows: (It’s an Actiontec GT704WG)

DMZ Hosting enabled on
27015 TCP and 27015 UDP are both forwarded on

I have a lot more ports in there, but that IS in there. Even though it really don’t matter, since I have DMZ hosting enabled.

What’s going on guys? I need help, I know it used to work but now it doesn’t work all of the sudden. I tried CS:S and it can still run a dedicated server and be able to play in it on the same computer with no problems.

My specs:
Windows Vista Home Premium x86
3.0Ghz dual core CPU
4GB DDR2-533 RAM
300GB H.D.D. partitioned to a C: (system only) and D: (all my data) drives.

Don’t know if it matters but my internet IP is a 75. address

Attempted fixes I have tried:

Change the port: I have tried this, it gives the same error message.
Turn off firewall: I have tried, it still gives the error.

I would really appreciate it if any of you guys could help me out. I really want to get this fixed because when I host a listen server, no one can join through the Internet list or through the friends list, even though I typed heartbeat and sv_lan 0. And not to mention Garry’s Mod crashes a lot and if I crash everyone else will lose connection.

Thanks a million guys.

Try this:

If you have “Could not allogate server ip”:

  1. Start Sever
  2. Start Gmod
  3. In GAME console (don’t join your server. Open console in your main menu) type:

clientport 27006
tv_port 27021
hostport 27016

  1. Join your server via LAN

And try to update your server.

Thank you!! Those commands did the trick! But I got to redo it every time I launch Gmod. Is there any way to make it the default?

Does anyone know how to get Portal into the dedicated server? I can’t spawn any Portal objects and it isn’t in the list of available resources in SRCDS (source dedicated server)

You can, but I don’t exactly know how :slight_smile:

Use Slaye’s Dedicated Server (It allows you to easyly add Portal content)

Add/Change the commands in Garrysmod/Garrysmod/cfg/Config.cfg



It keeps resetting the Config.cfg so I made an autoexec.cfg file and it seems to be working okay for now.

Thanks guys, you’ve been a lot of help!

Well now the autoexec is reseting itself too so I really do have to do it on every boot of the game. But I’m hoping to get a new dedi set up on a server so I won’t have to worry about it.

try it in autoexec.cfg, if you don’t have one, made one.

lol? I just put 2 posts talking about autoexec.cfg

to default it on your server.bat or w/e their is a line that says
@echo off
echo Protecting srcds from crashes…
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title Watchdog
echo (%time%) srcds started.
start /wait orangebox\srcds.exe -console -game garrysmod +map rp_evocity_v2d +maxplayers 12 +ip +hostport 27015 +tv_port 27005
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

something like that on replace it with ur IP in the ipconfig

The best option is to set your advanced options in Steam. Right click Garry’s Mod on Steam and and click Properties and then set launch options +port 27016 +tv_port 27034 or any other.