<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title>Sysadmin Blog</title>
	<link href="https://www.cyberbyte.ch/blog/atom.php" rel="self" />
	<link href="https://www.cyberbyte.ch/blog/" />
	<id>https://www.cyberbyte.ch/blog/index.php</id>
	<updated>2026-05-02T08:45:30Z</updated>
	<author>
		<name>info@cyberbyte.ch</name>
		<email>info@cyberbyte.ch</email>
	</author>
	<entry>
		<title>Reverse Proxy mit HTTP Auth im Backend</title>
		<link href="https://www.cyberbyte.ch/blog/index.php?entry=entry170505-152715" />
		<link rel="alternate" type="text/html" href="https://www.cyberbyte.ch/blog/index.php?entry=entry170505-152715" />
		<link rel="edit" href="https://www.cyberbyte.ch/blog/index.php?entry=entry170505-152715" />
		<id>https://www.cyberbyte.ch/blog/index.php?entry=entry170505-152715</id>
		<summary type="html"><![CDATA[Damit man über einen Reverse-Proxy auf einen Web-Server zugreifen kann, welcher seinerseits wieder mit HTTP Basic Authentifizierung geschützt ist (und im Backend andere Login-Informationen als für die Anmeldung am Reverse Proxy erforderlich sind), muss die HTTP-Authentifizierung für den Backend-Server im Proxy-Abschnitt mitgegeben werden.<br /><br />Dazu muss zuerst Benutzername und Passwort in eine Base64-Zeichenkette encodiert werden:<br /><pre>echo -n &quot;User:Pass&quot; | base64<br />VXNlcjpQYXNz<br /></pre>(auch wenn kein Benutzername benutzt wird, muss das Doppelpunkt im zu encodierenden String enthalten sein!)<br /><br />Danach in der Konfiguration des als Reverse-Proxy verwendeten Frontend-Servers folgendes z.B. in einen Location-Abschnitt hinzufügen.<br /><br />Apache:<br /><pre>RequestHeader set Authorization &quot;Basic VXNlcjpQYXNz&quot;</pre><br />Nginx:<br /><pre>proxy_set_header Authorization &quot;Basic VXNlcjpQYXNz&quot;;</pre><br /><br /><strong>Technischer Hintergrund:</strong><br /><br />Sofern dieselben Anmelde-Informationen im Backend verwendet werden  wie im Frontend (Reverse-Proxy), sollte dieses bei der nachfolgenden HTTP-Auth Anfrage transparent vom Client Web-Browser weitergereicht werden, und obiger Parameter ist nicht notwendig.<br /><br />Wird hingegen versucht, sich mit unterschiedlichen HTTP-Auth Passwörter anzumelden (zuerst dasjenige für den Reverse-Proxy, dann dasjenige, welches der Backend-Webserver verlangt), ist darauf sofort die Anmeldung am Proxy nicht mehr gültig -&gt; Ein Zugriff würde so also nie funktionieren!]]></summary>
		<updated>2017-05-05T13:27:15Z</updated>
	</entry>
	<entry>
		<title>Turning SSLv3 off on Apache Server to mitigate &quot;POODLE&quot; attack (CVE-2014-3566)</title>
		<link href="https://www.cyberbyte.ch/blog/index.php?entry=entry141016-102212" />
		<link rel="alternate" type="text/html" href="https://www.cyberbyte.ch/blog/index.php?entry=entry141016-102212" />
		<link rel="edit" href="https://www.cyberbyte.ch/blog/index.php?entry=entry141016-102212" />
		<id>https://www.cyberbyte.ch/blog/index.php?entry=entry141016-102212</id>
		<summary type="html"><![CDATA[Add the following to your SSL configuration section:<br /><pre><br />   # Disable SSLv2 &amp; SSLv3 against POODLE issue (CVE-2014-3566)<br />    SSLProtocol All -SSLv2 -SSLv3<br /></pre><br />Note to insert this to <strong>all</strong> VirtualHost sections where SSL is enabled!<br /><br />Check your config:<br /><pre>apachectl configtest<br /></pre><br />Then restart apache server:<br /><pre>sudo service apache2 restart<br /></pre><br />To check if SSLv3 is turned off:<br /><pre>openssl s_client -connect <a href="http://www.ownspace.ch:443" >server.domain.tld:443</a> -ssl3<br /></pre><br />Then you shold see a message like this:<br /><pre>error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1260:SSL alert number 40<br /></pre><br />To disable SSLv3 within other services:<br /><a href="http://askubuntu.com/questions/537196/how-do-i-patch-workaround-sslv3-poodle-vulnerability-cve-2014-3566" >see this post</a>]]></summary>
		<updated>2014-10-16T08:22:12Z</updated>
	</entry>
	<entry>
		<title>Create Private Key, Certificate Request and (optionally) self-signed cert using OpenSSL</title>
		<link href="https://www.cyberbyte.ch/blog/index.php?entry=entry130211-200006" />
		<link rel="alternate" type="text/html" href="https://www.cyberbyte.ch/blog/index.php?entry=entry130211-200006" />
		<link rel="edit" href="https://www.cyberbyte.ch/blog/index.php?entry=entry130211-200006" />
		<id>https://www.cyberbyte.ch/blog/index.php?entry=entry130211-200006</id>
		<summary type="html"><![CDATA[First, set the common name (CN, ~FQDN) for the certificate:<br /><pre>CN=host.domain.tld</pre><br />Change to the directory where you would like to store the data relevant for certificates, e.g.:<br /><pre>cd /etc/ssl</pre><br />Then create a private key:<br /><pre>openssl genrsa -out private/${CN}.key 2048</pre><br />Generate the signing Request, either: <br />a) interactively, you&#039;ll have to answer some questions...:<br /><pre>openssl req -new -key private/${CN}.key -out ${CN}.csr</pre><br />b) using a customized openssl config file:<br /><pre>openssl req -new -config ${CN}-openssl.cnf -key private/${CN}.key -out ${CN}.csr</pre><br />Now you may either:<br />a) send the certificate request to an (official or internal) Certificate Authority to sign the Certificate<br /><br />b) for testing purposes only, you can also self-sign the certificate:<br /><pre>openssl x509 -req -days 1825 -in ${CN}.csr -signkey private/${CN}.key -out certs/${CN}.crt</pre><br />When you have received signed (or self-signed) certificate, you can copy all the files to the appropriate location.<br /><br />Probably you have to create a combined pkcs#12 (.p12, .pfx) file, containing private key and certificates:<br /><pre>openssl pkcs12 -export -in ${CN}.crt -certfile cafile.pem -inkey ${CN}.key -out ${CN}.pfx</pre>(where cafile.pem is the ca certificate bundle of issuing certificate authority)<br /><br />Clear the shell variable for the Common Name:<br /><pre>CN=</pre>]]></summary>
		<updated>2013-02-11T19:00:06Z</updated>
	</entry>
	<entry>
		<title>Remove Apache VirtualHost section</title>
		<link href="https://www.cyberbyte.ch/blog/index.php?entry=entry120717-000000" />
		<link rel="alternate" type="text/html" href="https://www.cyberbyte.ch/blog/index.php?entry=entry120717-000000" />
		<link rel="edit" href="https://www.cyberbyte.ch/blog/index.php?entry=entry120717-000000" />
		<id>https://www.cyberbyte.ch/blog/index.php?entry=entry120717-000000</id>
		<summary type="html"><![CDATA[This small <a href="http://www.cyberbyte.ch/Linux/Apache/remove_virtual.pl" >perl script</a> removes a VirtualHost configuration section<br /><br />Call with:<br /><pre>remove_virtual.pl &lt;webname&gt; &lt;apache conf file&gt;</pre><br /><code>&lt;webname&gt;</code> is to be replaced with the FQDN of the name based virtual host (ServerName)<br /><br /><code>&lt;apache conf file&gt;</code> is the full path to the apache configuration file that contains the VirtualHost]]></summary>
		<updated>2012-07-16T22:00:00Z</updated>
	</entry>
</feed>
