AugustoArpex Posted April 1, 2018 Share Posted April 1, 2018 Hello, I'm trying to set up an automatic firewall on my server. Of the type that when a new server activates, it runs a script to release the port using the csf firewall or ufw. But I could not perform the operation. In theory, the shell script should pick up the service port and store it in a variable for use later. Only by putting the variable ${ThisService_GamePort} does not work. Could anyone help? Link to comment Share on other sites More sharing options...
Dennis Posted April 1, 2018 Share Posted April 1, 2018 You can create shell scripts from TCAdmin. Use the port and IP variables for TCAdmin to open the ports. If using csf, use csf -r at the end of the script. What event is the script running at? Link to comment Share on other sites More sharing options...
AugustoArpex Posted April 1, 2018 Author Share Posted April 1, 2018 I tried doing this procedure but when I put the variable ${ThisService_GamePort} does not work. Maybe I'm giving this error because I'm trying to run it by the system shell itself? Not using the tcadmin panel. And how can I test this command? Would I have to create a new service to see the behavior of the script? Link to comment Share on other sites More sharing options...
Dennis Posted April 1, 2018 Share Posted April 1, 2018 What does your script look like? Link to comment Share on other sites More sharing options...
AugustoArpex Posted April 3, 2018 Author Share Posted April 3, 2018 I'm not able to just release the port through csf. I'll pass the code to ufw. In addition to being much simpler. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now