Commit 8e549352 authored by Till Brehm's avatar Till Brehm
Browse files

Changed behaviour of UFW installation. Do not enable it by deafult as the...

Changed behaviour of UFW installation. Do not enable it by deafult as the firewall will get enabled autmatically when a firewall record gets added in ispconfig. Enabling it without that record, the Firewall would lock out the user on next reboot.
parent 4bdecca4
......@@ -1842,12 +1842,14 @@ Email Address []:
public function configure_ufw_firewall()
{
$configfile = 'ufw.conf';
if(is_file('/etc/ufw/ufw.conf')) copy('/etc/ufw/ufw.conf', '/etc/ufw/ufw.conf~');
$content = rf("tpl/".$configfile.".master");
wf('/etc/ufw/ufw.conf', $content);
exec('chmod 600 /etc/ufw/ufw.conf');
exec('chown root:root /etc/ufw/ufw.conf');
if($this->is_update == false) {
$configfile = 'ufw.conf';
if(is_file('/etc/ufw/ufw.conf')) copy('/etc/ufw/ufw.conf', '/etc/ufw/ufw.conf~');
$content = rf("tpl/".$configfile.".master");
wf('/etc/ufw/ufw.conf', $content);
exec('chmod 600 /etc/ufw/ufw.conf');
exec('chown root:root /etc/ufw/ufw.conf');
}
}
public function configure_bastille_firewall() {
......
......@@ -2,7 +2,7 @@
#
# set to yes to start on boot
ENABLED=yes
ENABLED=no
# set to one of 'off', 'low', 'medium', 'high'
LOGLEVEL=low
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment