Current time: 11-26-2024, 07:41 PM Hello There, Guest! (LoginRegister)


Post Reply 
No SSL Support in VHCS ?
Author Message
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #1
Question No SSL Support in VHCS ?
Why does VHCS not support SSL (HTTPS, IMAP-SSL, POP3-SSL) ??
Is there a reason ?

In the /docs/debian-packages.txt are no courier-imap-ssl courier-pop-ssl or somithing with SSL.

It think that the support of all SSL are needed.
Or is there a solution to do it manualy ?
Because all configs must touched to get work with SSL
01-23-2007 08:23 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #2
RE: No SSL Support in  VHCS ?
courier-ssl is not a problem just install the packages, generate a certificate and you're done.
vhcs is only touching once the config of courier-authdaemon after that nothing happens with courier-* Information about mail-acc and so on are derived over mysql.

https support for the panel itself is planned.
support for SSL for user-domains is planned, too.
01-23-2007 09:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #3
RE: No SSL Support in  VHCS ?
Okay - i will test it with courier-*

And for the https we all have to wait or is there a Patch anywhere ?
01-23-2007 10:09 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #4
RE: No SSL Support in  VHCS ?
on the "old" site there's a howto secure the panel site via ssl.
They recommend using a reverse-proxy in Front.

We can do it better by introducing our "default" host - so we could redirect from http to https i.e. .
There's already a patch around for adding a SSL - Button to the login - page.
01-23-2007 10:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #5
RE: No SSL Support in VHCS ?
Here is a German Workaround for https!

Hier ist ein kleine Hilfe um Domains unter VHCS 2.x mit SSL laufen zu lassen.
[bearbeiten]
Voraussetzung

* Apache 2
* VHCS 2.2 / 2.4

Bevor Sie mit der SSL-Einrichtung beginnen soll das System erst richtig mit Apache, mod_ssl usw. laufen.

Sollte etwas fehlen installieren sie es einfach nach.

Habe eine extra Datei in etc/apache2/sites-available/vhcs2_ssl.conf angelegt.

In der Datei habe ich die Einträge für den SSL VHOST gemacht.

<VirtualHost domain.tld:443>

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/domain.tld.crt
SSLCertificateKeyFile /etc/apache2/ssl/domain.tld.key

ServerAdmin root@domain.tld
DocumentRoot /var/www/virtual/domain.tld/htdocs

ServerName domain.tld
ServerAlias http://www.domain.tld

ErrorLog /var/log/apache2/users/domain.tld.at-ssl-error.log
TransferLog /var/log/apache2/users/domain.tld-ssl-access.log
CustomLog /var/log/apache2/domain.tld-ssl-traf.log traff
CustomLog /var/log/apache2/domain.tld-ssl-combined.log combined

Alias /errors /var/www/virtual/domain.tld/errors/

ErrorDocument 401 /errors/401/index.php
ErrorDocument 403 /errors/403/index.php
ErrorDocument 404 /errors/404/index.php
ErrorDocument 500 /errors/500/index.php

# httpd dmn entry cgi support BEGIN.
ScriptAlias /cgi-bin/ /var/www/virtual/domain.tld/cgi-bin/
<Directory /var/www/virtual/domain.tld/cgi-bin>
AllowOverride None
#Options ExecCGI
Order allow,deny
Allow from all
</Directory>
# httpd dmn entry cgi support END.

<Directory /var/www/vhcs2/gui>
php_admin_value open_basedir "/var/www/vhcs2/gui/:/etc/vhcs2/:/proc/:/var/www/virtual/:/tmp/"
</Directory>

# httpd dmn entry PHP2 support BEGIN.
php_admin_value
open_basedir "/var/www/virtual/domain.tld/:/usr/share/pear/:/tmp/:/var/"
# httpd dmn entry PHP2 support END.

<Directory /var/www/virtual/domain.tld/htdocs>
# httpd dmn entry PHP support BEGIN.
# httpd dmn entry PHP support END.
Options -Indexes Includes FollowSymLinks MultiViews
AllowOverride All
#AuthConfig
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

Damit neue Domains gleich richtig von VHCS angelegt werden, muss man in den folgenden 3 Dateien Folgendes ändern.

Datei /etc/vhcs2/apache/parts/als_entry.tpl

<VirtualHost {ALS_NAME}>

ändern in

<VirtualHost {ALS_NAME}:80>

Datei /etc/vhcs2/apache/parts/dmn_entry.tpl

<VirtualHost {DMN_NAME}>

ändern in

<VirtualHost {DMN_NAME}:80>


Datei /etc/vhcs2/apache/parts/sub_entry.tpl

<VirtualHost {SUB_NAME}>

ändern in

<VirtualHost {SUB_NAME}:80>


Dann musste ich ein paar Änderungen in der Datei etc/apache2/sites-available/vhcs2.conf machen.

NameVirtualHost 123.456.789.100

musste ich in

NameVirtualHost 123.456.789.100:80

ändern.

Außerdem musste bei jedem VHOST (für jede Domain) noch Port 80 eingetragen werden - also

<VirtualHost domain.tld:80>

Wenn Ihr schon mehrere Domains habt macht das am besten so:

Zuerst in der Datenbank alle Domains und Domain-Aliasse auf Status change setzen (geht einfach mit phpMyAdmin).

UPDATE `domain_aliasses` SET `alias_status` = 'change' WHERE
`alias_status` = 'ok';

UPDATE `domain` SET `domain_status` = 'change' WHERE
`domain_status` = 'ok';

Dann die Engine manuell anstoßen, indem Ihr in der Konsole /var/www/vhcs2/engine/vhcs2-rqst-mngr eingebt. Das dauert dann je nach Anzahl der Domains etwas.

Macht dann von der Datei /etc/apache2/sites-available/vhcs2.conf eine Kopie und ersetzt die Datei in /etc/vhcs2/apache/working/vhcs2.conf damit.

Das ist wichtig, da ansonsten bei der nächsten Änderung VHCS die alten Daten von der vhcs.conf für Apache wieder herstellt.

Dann musste ich in der Datei etc/apache2/apache2.conf ganz am Ende

Include /etc/apache2/sites-available/vhcs2_ssl.conf

eintragen.

Weiterhin habe ich meine Zertifikate (selbst erstellt - mit "apache2-ssl-certificate") in /etc/apache2/ssl abgelegt.

Des Weiteren musste ich in der Datei /etc/apache2/ports.conf

Listen 443

eintragen.

Dann nicht vergessen den Apache2 neu zu starten.

/etc/init.d/apache2 restart

Jetzt sollte SSL für die jeweiligen Domains (angegeben in der vhcs2_ssl.conf) laufen.


Weitere Informationen zur SSL-Installation (http://www.ilovett.com/blog/archives/200...-apache2).
01-23-2007 10:45 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #6
RE: No SSL Support in  VHCS ?
mh we know how to do it - the problem are some other things - this one will interfere with some things Omega is different from vhcs 2.4.7.1.

But one part remains unchanged - if you like you're welcome to make a guide on howto generate a certificate step-by-step.
And which files are needed and so on.
01-23-2007 11:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: No SSL Support in  VHCS ?
You mean a How to Generate a SSL-Certificate Step-by-Step ?
01-23-2007 11:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #8
RE: No SSL Support in  VHCS ?
yeah!

the part with SSL in Omega will be finished i a few days.
01-23-2007 11:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #9
RE: No SSL Support in VHCS ?
Step 1: Generate a Private Key

The openssl toolkit is used to generate an RSA Private Key and CSR (Certificate Signing Request). It can also be used to generate self-signed certificates which can be used for testing purposes or internal usage.

The first step is to create your RSA Private Key. This key is a 1024 bit RSA key which is encrypted using Triple-DES and stored in a PEM format so that it is readable as ASCII text.

Code:
#openssl genrsa -des3 -out server.key 1024

Code:
Generating RSA private key, 1024 bit long modulus
    .........................................................++++++
    ........++++++ e is 65537 (0x10001)
    Enter PEM pass phrase:
    Verifying password - Enter PEM pass phrase:

Step 2: Generate a CSR (Certificate Signing Request)

Once the private key is generated a Certificate Signing Request can be generated. The CSR is then used in one of two ways. Ideally, the CSR will be sent to a Certificate Authority, such as Thawte or Verisign who will verify the identity of the requestor and issue a signed certificate. The second option is to self-sign the CSR, which will be demonstrated in the next section.

During the generation of the CSR, you will be prompted for several pieces of information. These are the X.509 attributes of the certificate. One of the prompts will be for "Common Name (e.g., YOUR name)". It is important that this field be filled in with the fully qualified domain name of the server to be protected by SSL. If the website to be protected will be https://public.domain.tld then enter public.domain.tld at this prompt. The command to generate the CSR is as follows:

Code:
#openssl req -new -key server.key -out server.csr

Code:
Country Name (2 letter code) [GB]: DE
    State or Province Name (full name) [Berkshire]:Bayern
    Locality Name (eg, city) [Newbury]:Lindau
    Organization Name (eg, company) [My Company Ltd]:Company XYZ
    Organizational Unit Name (eg, section) []:Computer Org
    Common Name (eg, your name or your server's hostname) []:public.domain.tdl
    Email Address []:postmaster@domain.tdl
    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:

Step 3: Remove Passphrase from Key

One unfortunate side-effect of the pass-phrased private key is that Apache will ask for the pass-phrase each time the web server is started. Obviously this is not necessarily convenient as someone will not always be around to type in the pass-phrase, such as after a reboot or crash. mod_ssl includes the ability to use an external program in place of the built-in pass-phrase dialog, however, this is not necessarily the most secure option either. It is possible to remove the Triple-DES encryption from the key, thereby no longer needing to type in a pass-phrase. If the private key is no longer encrypted, it is critical that this file only be readable by the root user! If your system is ever compromised and a third party obtains your unencrypted private key, the corresponding certificate will need to be revoked. With that being said, use the following command to remove the pass-phrase from the key:

Code:
#cp server.key server.key.org
#openssl rsa -in server.key.org -out server.key

The newly created server.key file has no more passphrase in it.

Code:
-rw-r--r-- 1 root root 745 Jun 29 12:19 server.csr
    -rw-r--r-- 1 root root 891 Jun 29 13:22 server.key
    -rw-r--r-- 1 root root 963 Jun 29 13:22 server.key.org

Step 4: Generating a Self-Signed Certificate

At this point you will need to generate a self-signed certificate because you either don't plan on having your certificate signed by a CA, or you wish to test your new SSL implementation while the CA is signing your certificate. This temporary certificate will generate an error in the client browser to the effect that the signing certificate authority is unknown and not trusted.

To generate a temporary certificate which is good for 365 days, issue the following command:

Code:
#openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Code:
Signature ok
    subject=/C=DE/ST=Bayern/L=Lindau/O=Company XYZ=Computer Org
    /CN=public.domain.tdl/Email=postmaster@domain.tdl
    Getting Private key
(This post was last modified: 01-25-2007 05:56 PM by BeNe.)
01-24-2007 12:31 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RatS Offline
Project Leader
******

Posts: 1,854
Joined: Oct 2006
Reputation: 17
Post: #10
RE: No SSL Support in VHCS ?
There are a lot of SSL patches in the current trunk, you only have to activate them Big Grin
Check the code, it's commented!

check the config files, there are TLS and SSL parts commented.

for IMAP-SSL and POP-SSL install the packages (courier-imap-ssl & courier-pop-ssl) and cofigure the config files.

Don't forget to create a certificate!
(This post was last modified: 01-24-2007 10:35 AM by RatS.)
01-24-2007 10:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)