To customize the web page blocking.
we have the following:
In my case
Filezilla to enter NethServer via SFTP and so download the modules to edit
Download from the following path: /var/www/cgi-bin
- nethserver-block.cgi
- ns-babel.en
Edit (ns-babel.en) to (ns-babel.xx) where (xx = es or pt etc)
Keeping this begin editing modules.
Modification (nethserver-block.cgi):
#
# CONFIGURABLE OPTIONS:
#
# (Currently: "en", "fr", "de", "es", "nl", "no")
@supported = (
"en (English), ",
"it (Italiano)."
);
By
#
# CONFIGURABLE OPTIONS:
#
# (Currently: "en", "fr", "de", "es", "nl", "no")
@supported = (
"en (English), ",
"it (Italiano).",
"es (Spanish)."
);
In this step we are already indicating the new language to use.
I edit the following lines of “# template of SQUIDGUARD”:
print '<hr><div style="float:right;">Administrado por <a href="http://hardsofttecnologia.com.ve">Hard & Soft TecnologĂa C.A.</a></div></body></html>';
Save the changes.
Now modify (ns-babel.xx)
In this file parameters are displayed in the block page.
Unknown=
Title=403 Forbidden
Msg=The access to this site is blocked.
Tabclientname=Client name
Tabcaption=Additional information:
TabIP=Client address
Tabclientuser=Client user
Tabclientgroup=Category
Taburl=URL
Tabtargetgroup=Target group
msginaddr=Surfing on plain <U>IP addresses</U> is denied from this client due to network access policies.
msgalternatives=The following possible alternatives were found:
msgnoalternatives=No alternative domainname were found for the server
msgwebmaster=Please ask the <U>webmaster</U> of that server for the correct <EM>domainname</EM>.
Origin=Origin
ReqURL=The requested URL
User=User
TitleVirus=SquidClamAv: Virus detected!
TitleBrowseUnsafe=SquidClamAv: Unsafe Browsing detected
subtitle=Virus name
subtitleUnsafe=Malware / pishing type
errorreturn = This file cannot be downloaded.
errorreturnUnsafe = This page can not be displayed
urlerror = contains a virus
urlerrorUnsafe = is listed as suspicious
Currently the module (nethserver-block.cgi) has prefinished show the following:
Modifying it would look like:
I created in ns-babel.es “Msg1” will have a custom message
Msg1=Por PolĂticas de Seguridad no esta permitido el acceso a este tipo de pagina.
to display customized messages ns-babel.xx must write a new line following the program.
right way to Modification in (nethserver-block.cgi):
print "$Babel{Msg1}";
Wrong way to Modification in (nethserver-block.cgi):
print "$Babel{Msg1};"
print "$Babel{Msg1};
If it is written incorrectly blocking page will not open correctly.
They should always be aware of how programming.
Regards