my $servers_file = "${General::swroot}/dns/servers";
# Create files if the does not exist.
-unless (-f $settings_file) { system("touch $settings_file") };
-unless (-f $servers_file) { system("touch $servers_file") };
+unless (-f $settings_file) { &General::system("touch", "$settings_file") };
+unless (-f $servers_file) { &General::system("touch", "$servers_file") };
# File which stores the ISP assigned DNS servers.
my @ISP_nameserver_files = ( "/var/run/dns1", "/var/run/dns2" );
my %color = ();
my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
&Header::showhttpheaders();
&Header::getcgihash(\%cgiparams);
$cgiparams{'ENABLE_SAFE_SEARCH'} = "off";
}
+ if ($cgiparams{'ENABLE_SAFE_SEARCH_YOUTUBE'} ne "on") {
+ $cgiparams{'ENABLE_SAFE_SEARCH_YOUTUBE'} = "off";
+ }
+
# Check if using ISP nameservers and TLS is enabled at the same time.
if (($cgiparams{'USE_ISP_NAMESERVERS'} eq "on") && ($cgiparams{'PROTO'} eq "TLS")) {
$errormessage = $Lang::tr{'dns isp nameservers and tls not allowed'}
# Hash to store the generic DNS settings.
my %settings = ();
+$settings{"ENABLE_SAFE_SEARCH_YOUTUBE"} = "on";
# Read-in general DNS settings.
&General::readhash("$settings_file", \%settings);
$checked{'ENABLE_SAFE_SEARCH'}{'on'} = '';
$checked{'ENABLE_SAFE_SEARCH'}{$settings{'ENABLE_SAFE_SEARCH'}} = "checked='checked'";
+$checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{'off'} = '';
+$checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{'on'} = '';
+$checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{$settings{'ENABLE_SAFE_SEARCH_YOUTUBE'}} = "checked='checked'";
+
$selected{'PROTO'}{'UDP'} = '';
$selected{'PROTO'}{'TLS'} = '';
$selected{'PROTO'}{'TCP'} = '';
</td>
</tr>
+ <tr>
+ <td width="33%">
+ » $Lang::tr{'dns enable safe-search youtube'}
+ </td>
+
+ <td>
+ <input type="checkbox" name="ENABLE_SAFE_SEARCH_YOUTUBE" $checked{'ENABLE_SAFE_SEARCH_YOUTUBE'}{'on'}>
+ </td>
+ </tr>
+
<tr>
<td colspan="2">
<br>
$rdns = gethostbyaddr($iaddr, AF_INET);
}
- if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; }
+ if (!$rdns) { $rdns = $Lang::tr{'ptr lookup failed'}; }
# Mark ISP name servers as disabled
if ($id <= 2 && $enabled eq "disabled") {
&IDS::call_suricatactrl("restart");
}
# Restart unbound
- system('/usr/local/bin/unboundctrl reload >/dev/null');
+ &General::system('/usr/local/bin/unboundctrl', 'reload');
}
# Check if the system is online (RED is connected).