TRAGEDY

Creating a dedicated server

Recommended Posts

Posted (edited)

word of warning that im a super noob so pls dont get mad at me for asking dumb questions.... 

I installed the latest client and server made a server directory and launched a server with these:

 +set fs_game mods/pml11223 +set dedicated 2 +set sv_punkbuster 0 +set sv_maxclients 12 +map_rotate +exec config.cfg

i forwarded the 28960 port on my router:

 

1369614774_HG8245H5-GoogleChrome9_6_20218_57_27AM.png.53b141c58724d52f208d0d762836358b.png

(i also allowed iw3mp through my firewall)

the server runs with no errors

so i sent it to my friend... he can see the server but it shows that there are 29 players while i didnt add any bots so it should be 0 and when he tries to connect he timeouts

does any one know how to fix and how i can get it running?

tks in advance

Edited by TRAGEDY

Share this post


Link to post
Share on other sites

i assume you're running the server on your personal computer and your friend wants to connect over the internet to your server. are you able to connect to your server from the same pc? (just to make sure it's actually running)

did you give your public ip address to your friend? (https://www.whatsmyip.org/)

it might be necessary to set net_ip to your public ip address (+set net_ip xxx.xxx.xxx.xxx)

Share this post


Link to post
Share on other sites
Posted (edited)

yup i connected and it works 

and yea i used my public ip

ill try using set net_ip and reply

 

Edited by TRAGEDY

Share this post


Link to post
Share on other sites

i used +set net_ip xxx.xxx.xxx (my public ip from (https://www.whatsmyip.org/)) and tried running the server and it said "could not bind to ipv4 network socket" and server didnt start wht did i do wrong and how can i fix it ?

tks in advance

Share this post


Link to post
Share on other sites
Posted (edited)

It usually doesn't bind if it is in use.

I use my local address within the +set net_ip and it works just fine.

Also visible for public players

Port forward 28961 and set your server with:

+set net_ip xxx.xxx.xxx +set net_port 28961

Try that and see if you get it working

Edited by MAD_DAD

Share this post


Link to post
Share on other sites

if you want a quick way to look at your local address then open a cmd window  - right click  the start icon click "Run" type cmd and press enter then type ipconfig/all and press enter

Your local address is under:  IPv4 Address. . . . . . . . . . . : 192.168.0.50(Preferred)

(192.168.0.50 is my local address)

Share this post


Link to post
Share on other sites

i used my local address and used port 28961...

i connected to the server so it works for me but my friend couldnt connect

Share this post


Link to post
Share on other sites
Posted (edited)

make sure your windows firewall is set to allow cod4x18_dedrun.exe on both public and private

Also make sure your port 28961 is forwarded on local as well as public.

I have mine set to both protocols (tcp / udp)

Edited by MAD_DAD

Share this post


Link to post
Share on other sites
Posted (edited)

yup i forwarded the ports of 28961 and 28960 

i rechecked and it seems like i had only allowed iw3mp through the firewall while cod4x18_dedrun.exe had no rules 

so i allowed it (private and public) through inbound rules

i will try the server and send a reply

edit: i retried and same thing... my friend cannot connect but i can, for him not even the server name shows up

edit: and should i allow cod4x_dedrun.exe through outbound rules and/or inbound rules ?

Edited by TRAGEDY

Share this post


Link to post
Share on other sites
Posted (edited)

Allow through firewall as in picture. I just allowed it in this part

Untitled.jpg

Edited by MAD_DAD

Share this post


Link to post
Share on other sites

It looks like the port is not forwarded on the external IP. Check your port forward settings and make sure it is showing that the internal and external is done

Share this post


Link to post
Share on other sites
Posted (edited)

It doesn't show but I forwarded for UDP and TCP for both 28960 and 28961 ports 

When I make the server it also says for ipv4 and ipv6 ports are forwarded 

Edited by TRAGEDY

Share this post


Link to post
Share on other sites
Posted (edited)

You have definately set :

+set dedicated 2

 

Make sure in your config that the settings are not being overidden for:

set dedicated "2"

set net_ip "0.0.0.0"

set net_port 28960

If  they are put // before them

Like this:

//set dedicated "2"

//set net_ip "0.0.0.0"

//set net_port 28960

 

Edited by MAD_DAD

Share this post


Link to post
Share on other sites
Posted (edited)

I have used these exact commands and these commands only :

 

sv_hostname "Servername"

rcon_password "rcon password"
sv_privateclients "3"

sv_floodProtect "1"
sv_reconnectLimit "3"

sv_cheats "1"
sv_voice "1"
scr_teambalance "1"
g_allowvote "1"
sv_authorizemode "1"
Edited by TRAGEDY

Share this post


Link to post
Share on other sites

MAD_DAD told me that its a port forwarding error and i checked and it seems my 28961 port is not open so can someone guide me through the whole process? This is my port forward setting in my router 1499983761_HG8245H5-GoogleChrome10_6_20212_35_15PM.thumb.png.60c54b519e9b8ba22036892629dca06e.png

should i do port mapping configuration or port trigger configuration?

if it is port trigger configuration i have given the settings in the 1st post 

if it is port mapping configuration this is wht i can do :330673827_HG8245H5-GoogleChrome10_6_20212_40_56PM.thumb.png.f5ef21ad52cadf91f47f422bc344281e.png

so wht should i input and to which setting ? 

tks in advance to any kind soul who replies

Share this post


Link to post
Share on other sites

i forwarded according to the video and checked the manual still no success 

ill try contacting my isp and reply 

Share this post


Link to post
Share on other sites

If the server is starting for you and you can connect but your friends cannot...what message are they getting..can they see your server?

I think your port forward looks ok. It believe it wont show as open until something actually connects to it. 

In your router do not forget to assign (normally in LAN SETUP) a local IP to the machine so it's fixed. My machine will always be 192.168.1.4 for example. If you don't and restart router, windows, machine etc it MAY assign a different local IP. 

Share this post


Link to post
Share on other sites

"External source address" needs to stay empty

check if "Internal Host" is equal to the ip address of your pc (like smiley said, it may change when the router is restarted)

you can check if your port is reachable with for example https://www.yougetsignal.com/tools/open-ports/ it will show if the cod4 server is running

  • Like 1

Share this post


Link to post
Share on other sites

i contacted my isp and it seems that my router was assigned a private address so i requested a public address and now i checked my port but it said that my port was still closed tho

and yea i put a static ip to my device as 192.168.1.8 but still no sign of port being opening 

ill tell my friend to connect and come back to yall

Share this post


Link to post
Share on other sites

yooooo my friend connected and it works thank you all for helping a noob af like me (especially  MAD_DAD tks man i owe u)  and giving me ur time of the day i wish yall the best of luck in ur future endevours 

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.