Add Additional Port (docker) doesn't work

OS Name/Version: Debian 12

Product Name/Version: Bookworm

Problem Description:
Hi,
I want to enable cstv on my cs2 servers. I know that i have to open Ports, because my cs2 instance is running in a container. When i try to configure the new port to the instance via “Edit Setting” and than go to Ports and try to add an Additional Port, no new port will be opened via OS. In my case i want to open 27020 for cstv.

root@ttsrv01:~# ss -tuanp | grep -i 27015
udp   UNCONN    0      0                  *:27015              *:*     users:(("cs2",pid=6810,fd=65))
tcp   LISTEN    0      2            0.0.0.0:27015        0.0.0.0:*     users:(("cs2",pid=6810,fd=70))
tcp   ESTAB     0      0          127.0.0.1:27015      127.0.0.1:56164 users:(("cs2",pid=6810,fd=86))
tcp   ESTAB     0      0          127.0.0.1:56164      127.0.0.1:27015 users:(("AMP_Linux_x86_6",pid=6617,fd=14))
root@ttsrv01:~# ss -tuanp | grep -i 27020
root@ttsrv01:~#

Steps to reproduce:

  • Step 1: Edit instance and add the port (+ button is also not working)
  • Step 2: restart Instance manually, bc Insance wont restart via button
  • Step 3: Make sure server.cfg hase tv_enable 1, tv_port 27020

Actions taken to resolve so far:
nothing

Regards Tobi

Opening the port doesn’t necessarily mean that the application inside the container will actually listen. You should check that the server logs show its listening and run the command inside the container rather than on the host.

Ok so you mean I should try the ss command via docker exec ?

Indeed, or rather by using docker exec to get a shell, and running it in there.

Hi Mike,

i tried the command ss inside the container here is the output. There is no udp/tcp port opened. As i allready mentioned the plus button in the Setting picture doesnt work.


I know that the Exclude from Firewall switch is on. I put it on for testing reasons. Normally this switch is off

In your screenshot, you still need to hit (+).
But with your settings, it will only be a visible thing for AMP. AMP will run the container with network mode host and won’t create firewall rules for you. The application could start listening on every port and as long you create firewall rules yourself, it would work without adding the port on that screen. If ss -tulpen | grep <port> doesn’t show the port as listening, you need to look why the application won’t listen to the port. Nothing to do with AMP at this point. Double check you have configured the port in the application and the application is meant to listen on that port. It also could be the application doesn’t listen all the time on that port. Some games only start listening on some ports if somebody has already connected.

as i allready said i cant hit + bc it does nothing… It might be that some games only listen to ports when someone is connected. But why does cs2 show 27015 without connections and 27020 (cstv) without. If i run the same command without a cs2 server in amp it works like a charm. So it has something to do with amp

Explain your last post more? Don’t follow what you are saying

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.