Friends can't connect to server

I have a server I am hosting on my personal computer that my friends are unable to connect to. I am 100% positive my ports for 28015-28016 are open and working since my friends can connect to my minecraft server with those ports. Running the server bat for minecraft with port 28015 shows the port as open on https://canyouseeme.org/ but if I run the Rust bat file the port does not show as open so it seems there is something wrong with my bat file that is not opening the port. I have my desktop connected via ethernet cable to my router which is connected to my gateway. My friends are attempting to connect via [client.connect publicip:28015]. This is my bat file settings for rust:

echo off
:start
C:\SteamCMD\steamcmd.exe +login anonymous +force_install_dir c:\rustserver\ +app_update 258550 +quit
RustDedicated.exe -batchmode ^
+server.port 28015 ^
+rcon.port 28016 ^
+server.level "Procedural Map" ^
+server.seed 150 ^
+server.worldsize 4250 ^
+server.maxplayers 20 ^
+server.hostname "." ^
+server.description "PrivateServer" ^
+server.url "." ^
+server.headerimage "." ^
+server.identity "Server1" ^
+rcon.password . ^
+rcon.web 1

goto start

I have tried adding +server.ip with both my public IP as well as 0.0.0.0 but still the same issue. My windows firewall has also had the ports opened.

Please let me know if there is anything else I can provide to help solve this issue. Thank you for any help.

Try changing the ports of your rust server

+server.port 28115 ^
+rcon.port 28116 ^

you should also open a port for the rust companion to work

The default port is the game port + 68, or the RCon port + 68, whichever is the larger number.

In the above instance port forward 28184 in your router, no need to add anything to the bat file.

Also id suggest making the map smaller if its just for you and friends to mess around with a 20 player max then a 3000 map should do.

Also if you are running pure vanilla then ignore this but if you are modded then remove this line from your dat file

C:\SteamCMD\steamcmd.exe +login anonymous +force_install_dir c:\rustserver\ +app_update 258550 +quit

and make another bat to update your server.

Thank you for the reply. I tried to change the port to 28115 but the issue still persist. The ports were also forwarded both on the gateway and the router. Once again the port shows as closed if I run the rust server bat file but if I run the minecraft server bat file the port shows as opened. Am I suppose to have something else in the bat file to open the port? The RCON port seems to get opened but the Rust server port itself doesn't.

recheck your public IP address then recheck your posts

https://www.yougetsignal.com/tools/open-ports/

if they are closed its down to your router port forwarding setup, or firewall blocking them.

try this

@echo off
cls
:start
echo Starting server...

RustDedicated.exe -batchmode -nographics ^
+rcon.port 28116 ^
+rcon.password "CHANGE-ME" ^
+rcon.web 1 ^
+server.port 28115 ^
+server.maxplayers 20 ^
+server.hostname "TEST" ^
+server.identity "server1" ^
+server.level "Procedural Map" ^
+server.seed 1 ^
+server.worldsize 3000 ^
+server.saveinterval 300 ^
+server.globalchat true ^
+server.description "TEST" ^
+server.headerimage "" ^
+server.url ""

echo.
echo Restarting server...
timeout /t 10
echo.
goto start

I somehow fixed it! I moved the rcon port to the bottom with the other rcon settings and added +server.ip localip(the 192.x.x.x one):28015. I also added +rcon.ip *.*.*.* to the rcon section. This somehow opened the 28015 port correctly and allowed my friends to connect. Gonna add some keywords in case people try to find this issue. I have a tplink router that is connected to my ATT gateway. Ports forwarded on gateway as well as tplink router. These were my final bat settings:

echo off
:start
C:\SteamCMD\steamcmd.exe +login anonymous +force_install_dir c:\rustserver\ +app_update 258550 +quit
RustDedicated.exe -batchmode ^
+server.ip 192.x.x.x ^
+server.port "28015" ^
+server.level "Procedural Map" ^
+server.seed 150 ^
+server.worldsize 4250 ^
+server.maxplayers 20 ^
+server.hostname "." ^
+server.description "PrivateServer" ^
+server.url "." ^
+server.headerimage "." ^
+server.identity "TestServer" ^
+rcon.password . ^
+rcon.ip *.*.*.*
+rcon.port 28016
+rcon.web 1

goto start

Try setting up the port fowarding if you want to play minecraft with your friends.

This might be the reason for your friend not able to connect server.

This guide can help you setting up the port forwarding, so you can easily play minecraft with your friend.

AhmedShah

Try setting up the port fowarding if you want to play minecraft with your friends.

This might be the reason for your friend not able to connect server.

This guide can help you setting up the port forwarding, so you can easily play minecraft with your friend.

The original poster said he could play Minecraft with his friends with no difficulty but the problem was playing Rust with his friends.