ISPConfig Self signed SSL Conflicting with Cloudflare SSL

Discussion in 'Installation/Configuration' started by strang3r, Dec 4, 2014.

  1. strang3r

    strang3r Member

    Hi,

    I have added my site on cloudflare using this gateway

    user > cloudflare flexible ssl > my website non ssl.

    But before that I removed my ISPConfig self signed SSL from that website, So I will be using http. But whenever I am trying to visit my website it comes up with my self signed ssl. So thats mean ssl still exists somewhere in ISPConfig and not removed even after turning off SSL option from website and deleting SSL certificate.

    Any suggestion to resolve this?. Will rebooting helps in this case?.
     
  2. strang3r

    strang3r Member

    ISPconfig have bugs on it's ssl option for website?. I removed SSL from a website by following...

    ISPconfig > Sites > Websites > SSL > Delete Certificate > Accept > Tick off SSL Option.

    I went back into SSL tab again and see no SSL cert. but its still showing my SSL... under that domain.

    My SSL was issued for name example.com

    and if I do ssl shopper check then I am still seeing that SSL active on that domain which made by ispconfig certificate creation within this domain. This is the error :

    It shows up that my domain still using another SSL which is not getting work with cloudflare SSL.

    Code:
    None of the common names in the certificate match the name that was entered (example.com). You may receive an error when accessing this site in a web browser.
    

    This is the test link: Here


    I did Apache restart but that doesn't help on restoring my site to non SSL.
     
    Last edited: Dec 5, 2014
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    There are no known problems with ssl in the current version.

    Did you disable the ssl checkbox on the first tab of the website?
    Is there a vhost file with .err ending in the /etc/apache2/sites-available/ folder?
     
  4. strang3r

    strang3r Member

    Yes I have SSL & SSI disabled for this website in: Sites > Websites > Domain

    [​IMG]

    There is no .err file within /etc/apache2/sites-available

    [​IMG]
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, and does the vhost file of that site contains a ssl section?
     
  6. strang3r

    strang3r Member

    This is my ispconfig.vhost settings

    Code:
    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################
    
     Listen 8080
    NameVirtualHost *:8080
    
    <VirtualHost _default_:8080>
      ServerAdmin webmaster@localhost
      
      <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
      </FilesMatch>
      
      <IfModule mod_fcgid.c>
        DocumentRoot /var/www/ispconfig/
        SuexecUserGroup ispconfig ispconfig
        <Directory /var/www/ispconfig/>
          Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
          AllowOverride AuthConfig Indexes Limit Options FileInfo
    	  <FilesMatch "\.php$">
    		  SetHandler fcgid-script
    	  </FilesMatch>
          FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
                Order allow,deny
          Allow from all
    	      </Directory>
        IPCCommTimeout  7200
    	MaxRequestLen 15728640
      </IfModule>
      
      <IfModule mpm_itk_module>
        DocumentRoot /usr/local/ispconfig/interface/web/
    	AssignUserId ispconfig ispconfig
        AddType application/x-httpd-php .php
        <Directory /usr/local/ispconfig/interface/web>
          # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
          Options +FollowSymLinks
          AllowOverride None
                Order allow,deny
          Allow from all
    	  	  php_value magic_quotes_gpc        0
        </Directory>
      </IfModule>
      
      # ErrorLog /var/log/apache2/error.log
      # CustomLog /var/log/apache2/access.log combined
      ServerSignature Off
      
      <IfModule mod_security2.c>
        SecRuleEngine Off
      </IfModule>
    
      # SSL Configuration
      SSLEngine On
      SSLProtocol All -SSLv2 -SSLv3
      SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
      SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
      #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
    
    </VirtualHost>
    
    <Directory /var/www/php-cgi-scripts>
        AllowOverride None
    	    Order Deny,Allow
        Deny from all
    	</Directory>
    
    <Directory /var/www/php-fcgi-scripts>
        AllowOverride None
            Order Deny,Allow
        Deny from all
    	</Directory>
    
    

    and this is my that website vhost settings..

    Code:
    <Directory /var/www/freepcgamesdl.com>
    		AllowOverride None
    				Order Deny,Allow
    		Deny from all
    		</Directory>
    
    <VirtualHost ipaddress:80>
    					DocumentRoot /var/www/freepcgamesdl.com/web
    			
    		ServerName freepcgamesdl.com
    		ServerAlias *.freepcgamesdl.com
    		ServerAdmin webmaster@freepcgamesdl.com
    
    		ErrorLog /var/log/ispconfig/httpd/freepcgamesdl.com/error.log
    
    		Alias /error/ "/var/www/freepcgamesdl.com/web/error/"
    		ErrorDocument 400 /error/400.html
    		ErrorDocument 401 /error/401.html
    		ErrorDocument 403 /error/403.html
    		ErrorDocument 404 /error/404.html
    		ErrorDocument 405 /error/405.html
    		ErrorDocument 500 /error/500.html
    		ErrorDocument 502 /error/502.html
    		ErrorDocument 503 /error/503.html
    
    		<IfModule mod_ssl.c>
    		</IfModule>
    
    		<Directory /var/www/freepcgamesdl.com/web>
    				# Clear PHP settings of this website
    				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
    						SetHandler None
    				</FilesMatch>
    				Options +FollowSymLinks
    				AllowOverride All
    								Order allow,deny
    				Allow from all
    						</Directory>
    		<Directory /var/www/clients/client1/web2/web>
    				# Clear PHP settings of this website
    				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
    						SetHandler None
    				</FilesMatch>
    				Options +FollowSymLinks
    				AllowOverride All
    								Order allow,deny
    				Allow from all
    						</Directory>
    
    
    
    
    		# suexec enabled
    		<IfModule mod_suexec.c>
    			SuexecUserGroup web2 client1
    		</IfModule>
    		# php as fast-cgi enabled
    	# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    		<IfModule mod_fcgid.c>
    				FcgidIdleTimeout 300
    				FcgidProcessLifeTime 3600
    				# FcgidMaxProcesses 1000
    				FcgidMaxRequestsPerProcess 5000
    				FcgidMinProcessesPerClass 0
    				FcgidMaxProcessesPerClass 10
    				FcgidConnectTimeout 3
    				FcgidIOTimeout 600
    				FcgidBusyTimeout 3600
    				FcgidMaxRequestLen 1073741824
    		</IfModule>
    		<Directory /var/www/freepcgamesdl.com/web>
    				<FilesMatch "\.php[345]?$">
    					SetHandler fcgid-script
    				</FilesMatch>
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php3
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php4
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php5
    				Options +ExecCGI
    				AllowOverride All
    								Order allow,deny
    				Allow from all
    						</Directory>
    		<Directory /var/www/clients/client1/web2/web>
    				<FilesMatch "\.php[345]?$">
    					SetHandler fcgid-script
    				</FilesMatch>
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php3
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php4
    				FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php5
    				Options +ExecCGI
    				AllowOverride All
    								Order allow,deny
    				Allow from all
    						</Directory>
    
    
    		# add support for apache mpm_itk
    		<IfModule mpm_itk_module>
    			AssignUserId web2 client1
    		</IfModule>
    
    		<IfModule mod_dav_fs.c>
    		# Do not execute PHP files in webdav directory
    			<Directory /var/www/clients/client1/web2/webdav>
    				<ifModule mod_security2.c>
    					SecRuleRemoveById 960015
    					SecRuleRemoveById 960032
    				</ifModule>
    				<FilesMatch "\.ph(p3?|tml)$">
    					SetHandler None
    				</FilesMatch>
    			</Directory>
    			DavLockDB /var/www/clients/client1/web2/tmp/DavLock
    			# DO NOT REMOVE THE COMMENTS!
    			# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
    			# WEBDAV END
    		</IfModule>
    
    
    </VirtualHost>
    
    I have SSL on server vhost as I have setup openssl for server. and I am seeing no SSL section in site vhost.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no ssl section in the site vhost that you posted. So ssl has been disabled correctly.

    The file ispconfig.vhost is not related at all, thats the ispconfig interface on port 8080 and not one of your websites.
     
  8. strang3r

    strang3r Member

    Yes I know but SSL Checker still seeing that I have an unkown SSL registered with name domain.com

    Code:
    None of the common names in the certificate match the name that was entered (domain.com). You may receive an error when accessing this site in a web browser.
    It is not supposed to show my domain name. It only shows when I have self signed SSL registered.

    And this is what a Self signed SSL do's

    Code:
    You may receive an error when accessing this site in a web browser
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You said that you configured a global ssl vhost outside of ispconfig, so this is most likeky causing your problems now.
     
  10. strang3r

    strang3r Member

    Actually I have SSL configured for my server interface in ispconfig.vhost. Is this global?. I thought it should be on interface at port 8080.

    So, I have SSL setup on this site server.1domain.com:8080 -> Self signed SSL working. and used same server name as full qualified domain when setting up by following howtoforge guide to make an openssl for interface.

    This above self signed SSL don't effect on this site if I visit https://domain3.com (SSL disable by default in site > websites. ) Status: Here

    But SSL effecting as self signed if I visit http://domain.com (SSL disable by default in site > websites ) Status: Here

    This both site under same vhost.


    How can I remove / check my Global SSL as you have mentioned?. So I can test if it is actually causing by global SSL or not. Because I haven't configured any global SSL outside of ispconfig.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    No, thats not global. Like I explaed above, the ispconfig vhost is not related to your problem.

    The global ssl is the file default-ssl which is from your linux distribution and not ispconfig. If this file is enabled by a symlink in sites-available folder, then you have a global ssl vhost.

    the vhost has no ssl, as we checked already. So if both domains are aliases of the same vhost, then maybe cloudflare has cahched something? Or you have a typo in one of the domains or one of the domains points to a different server / ip address.
     
  12. strang3r

    strang3r Member

    Hi, Thanks but I am very noob and learning.

    My sites all under one single IPv4.

    I found this in default-ssl. And I think it looks like my global ssl is on as you said?. There is follow sysmlink , SSL Engine On and certificate to snakeoil which are un commented in that file. SO this might be our culprit which causing this.

    Code:
    <IfModule mod_ssl.c>
    <VirtualHost _default_:443>
    	ServerAdmin webmaster@localhost
    
    	DocumentRoot /var/www
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    	<Directory /var/www/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    	</Directory>
    
    	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    	<Directory "/usr/lib/cgi-bin">
    		AllowOverride None
    		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog ${APACHE_LOG_DIR}/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
    
    	#   SSL Engine Switch:
    	#   Enable/Disable SSL for this virtual host.
    	SSLEngine on
    
    	#   A self-signed (snakeoil) certificate can be created by installing
    	#   the ssl-cert package. See
    	#   /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
    	#   If both key and certificate are stored in the same file, only the
    	#   SSLCertificateFile directive is needed.
    	SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
    	SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
    
    	#   Server Certificate Chain:
    	#   Point SSLCertificateChainFile at a file containing the
    	#   concatenation of PEM encoded CA certificates which form the
    	#   certificate chain for the server certificate. Alternatively
    	#   the referenced file can be the same as SSLCertificateFile
    	#   when the CA certificates are directly appended to the server
    	#   certificate for convinience.
    	#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
    
    	#   Certificate Authority (CA):
    	#   Set the CA certificate verification path where to find CA
    	#   certificates for client authentication or alternatively one
    	#   huge file containing all of them (file must be PEM encoded)
    	#   Note: Inside SSLCACertificatePath you need hash symlinks
    	#         to point to the certificate files. Use the provided
    	#         Makefile to update the hash symlinks after changes.
    	#SSLCACertificatePath /etc/ssl/certs/
    	#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
    
    	#   Certificate Revocation Lists (CRL):
    	#   Set the CA revocation path where to find CA CRLs for client
    	#   authentication or alternatively one huge file containing all
    	#   of them (file must be PEM encoded)
    	#   Note: Inside SSLCARevocationPath you need hash symlinks
    	#         to point to the certificate files. Use the provided
    	#         Makefile to update the hash symlinks after changes.
    	#SSLCARevocationPath /etc/apache2/ssl.crl/
    	#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
    
    	#   Client Authentication (Type):
    	#   Client certificate verification type and depth.  Types are
    	#   none, optional, require and optional_no_ca.  Depth is a
    	#   number which specifies how deeply to verify the certificate
    	#   issuer chain before deciding the certificate is not valid.
    	#SSLVerifyClient require
    	#SSLVerifyDepth  10
    
    	#   Access Control:
    	#   With SSLRequire you can do per-directory access control based
    	#   on arbitrary complex boolean expressions containing server
    	#   variable checks and other lookup directives.  The syntax is a
    	#   mixture between C and Perl.  See the mod_ssl documentation
    	#   for more details.
    	#<Location />
    	#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
    	#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
    	#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
    	#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
    	#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
    	#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
    	#</Location>
    
    	#   SSL Engine Options:
    	#   Set various options for the SSL engine.
    	#   o FakeBasicAuth:
    	#     Translate the client X.509 into a Basic Authorisation.  This means that
    	#     the standard Auth/DBMAuth methods can be used for access control.  The
    	#     user name is the `one line' version of the client's X.509 certificate.
    	#     Note that no password is obtained from the user. Every entry in the user
    	#     file needs this password: `xxj31ZMTZzkVA'.
    	#   o ExportCertData:
    	#     This exports two additional environment variables: SSL_CLIENT_CERT and
    	#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
    	#     server (always existing) and the client (only existing when client
    	#     authentication is used). This can be used to import the certificates
    	#     into CGI scripts.
    	#   o StdEnvVars:
    	#     This exports the standard SSL/TLS related `SSL_*' environment variables.
    	#     Per default this exportation is switched off for performance reasons,
    	#     because the extraction step is an expensive operation and is usually
    	#     useless for serving static content. So one usually enables the
    	#     exportation for CGI and SSI requests only.
    	#   o StrictRequire:
    	#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
    	#     under a "Satisfy any" situation, i.e. when it applies access is denied
    	#     and no other module can change it.
    	#   o OptRenegotiate:
    	#     This enables optimized SSL connection renegotiation handling when SSL
    	#     directives are used in per-directory context.
    	#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
    	<FilesMatch "\.(cgi|shtml|phtml|php)$">
    		SSLOptions +StdEnvVars
    	</FilesMatch>
    	<Directory /usr/lib/cgi-bin>
    		SSLOptions +StdEnvVars
    	</Directory>
    
    	#   SSL Protocol Adjustments:
    	#   The safe and default but still SSL/TLS standard compliant shutdown
    	#   approach is that mod_ssl sends the close notify alert but doesn't wait for
    	#   the close notify alert from client. When you need a different shutdown
    	#   approach you can use one of the following variables:
    	#   o ssl-unclean-shutdown:
    	#     This forces an unclean shutdown when the connection is closed, i.e. no
    	#     SSL close notify alert is send or allowed to received.  This violates
    	#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
    	#     this when you receive I/O errors because of the standard approach where
    	#     mod_ssl sends the close notify alert.
    	#   o ssl-accurate-shutdown:
    	#     This forces an accurate shutdown when the connection is closed, i.e. a
    	#     SSL close notify alert is send and mod_ssl waits for the close notify
    	#     alert of the client. This is 100% SSL/TLS standard compliant, but in
    	#     practice often causes hanging connections with brain-dead browsers. Use
    	#     this only for browsers where you know that their SSL implementation
    	#     works correctly.
    	#   Notice: Most problems of broken clients are also related to the HTTP
    	#   keep-alive facility, so you usually additionally want to disable
    	#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
    	#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
    	#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
    	#   "force-response-1.0" for this.
    	BrowserMatch "MSIE [2-6]" \
    		nokeepalive ssl-unclean-shutdown \
    		downgrade-1.0 force-response-1.0
    	# MSIE 7 and newer should be able to use keepalive
    	BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
    
    </VirtualHost>
    </IfModule>
    
    
    What step should I take to disable SSL function from this /etc/apache2/sites-available/default-ssl , so there is no global ssl from Apache But also at the same time it won't interfere with my ispconfig server interface ssl. Should I comment out certificate and SSL engine lines within default-ssl?.

    Thanks.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    the existence of the file /etc/apache2/sites-available/default-ssl does not mean that it is used. like I pointed out above, you have to look into /etc/apache2/sites-enabled/ to see if it is used or not.
     
  14. strang3r

    strang3r Member

    I don't have that file in etc/apache2/sites-enabled

    All files within this directory stated with 3 numeric digit at start. eg: 000-default

    and in 000-default this is what I have...

    Code:
    <VirtualHost *:80>
    	ServerAdmin webmaster@localhost
    
    	DocumentRoot /var/www
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    	<Directory /var/www/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    	</Directory>
    
    	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    	<Directory "/usr/lib/cgi-bin">
    		AllowOverride None
    		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog ${APACHE_LOG_DIR}/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    
    

    By the way... Few days back I applied Poodle SSL attack security on my vhost by following : http://www.howtoforge.com/how-to-secure-your-ispconfig-3-server-against-the-poodle-ssl-attack


    By any chance this can cause this issue?.

    Because I have this changes in my Apache web server.
    Code:
    /etc/apache2/mods-available/ssl.conf
    Before:
    Code:
    # enable only secure protocols: SSLv3 and TLSv1, but not SSLv2
    SSLProtocol all -SSLv2
    Now:
    Code:
    # enable only secure protocols: but not SSLv2 and SSLv3
    SSLProtocol all -SSLv2 -SSLv3

    Thank you! :)
     

Share This Page