mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
bug fix for ubuntu and docker manager
This commit is contained in:
@@ -386,10 +386,14 @@ class FirewallManager:
|
||||
FirewallUtilities.deleteRule("tcp", updateFW.port, "0.0.0.0/0")
|
||||
updateFW.port = sshPort
|
||||
updateFW.save()
|
||||
FirewallUtilities.addRule('tcp', sshPort, "0.0.0.0/0")
|
||||
except:
|
||||
try:
|
||||
newFireWallRule = FirewallRules(name="SSHCustom", port=sshPort, proto="tcp")
|
||||
newFireWallRule.save()
|
||||
FirewallUtilities.addRule('tcp', sshPort, "0.0.0.0/0")
|
||||
command = 'firewall-cmd --permanent --remove-service=ssh'
|
||||
ProcessUtilities.executioner(command)
|
||||
except BaseException, msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user