Jump to content

Firewall / Automatically port forwarding | Linux | If you need help!


MrFreeze4U

Did this help you?  

3 members have voted

  1. 1. Did this help you?



Recommended Posts

Go to your TCadmin panel, 
Click on "Settings",
Then "Global Game Scripts", 
Press "New",

Operating System "Linux",
Script Engine "Batch File/Shell Script",
Event "After Created",
Description "Anything you want"

In the big white box copy and Past this below:
 

ufw allow ${ThisService_GamePort}:${ThisService_GamePort}/tcp
ufw allow ${ThisService_QueryPort}:${ThisService_QueryPort}/tcp
ufw allow ${ThisService_RConPort}:${ThisService_RConPort}/tcp
ufw allow ${ThisService_GamePort}:${ThisService_GamePort}/udp
ufw allow ${ThisService_QueryPort}:${ThisService_QueryPort}/udp
ufw allow ${ThisService_RConPort}:${ThisService_RConPort}/udp

 

 

TCadminPort.PNG

Edited by MrFreeze4U
Operating System "Linux".
Link to comment
Share on other sites

  • MrFreeze4U changed the title to Firewall / Automatically port forwarding | Linux | If you need help!
  • 1 year later...

Is it possible to work with some kind of if statement, that checks if the ports are configured in the game template?
Some games don't use a query and or rcon port.

It would also be neat to have a for loop, which adds any custom ports. But again, I'm not sure if TCAdmin supports such functionality.

Link to comment
Share on other sites

On 2/13/2022 at 2:17 AM, gijs007 said:

Is it possible to work with some kind of if statement, that checks if the ports are configured in the game template?

Yes. You can do something like this:

if (( ${ThisService_QueryPort} > 0 )); then
    ...
fi

You can do the same thing for custom ports.

for i in {1..10}
do
	//Check if custom port is set and open the port in the firewall
done

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use