Why SSL does not work between my 2 servers?Where does WHM place .pem files for SSLStartSSL.com SSL Class2 Certificate and PostfixInternet Explorer 8 - TLS Fatal Error Close Notify - Oracle HTTP - Server Apache 2.2.22.0How to configure IIS 7.5 SSL TLS to work with iOS 9 ATSSSL handshake: is the server supposed to choose an earlier protocol?Using Squid to Upgrade TLS Connections to TLS 1.2Handshake in a load balanced system with SSL pass-throughClient did not present a certificate (Postfix)lftp 4.8.4 refuses to talk TLS1.2 with z/OS ftps hostMariadb TLS does not enable

Why aren't space telescopes put in GEO?

Computing the matrix powers of a non-diagonalizable matrix

Why do airplanes use an axial flow jet engine instead of a more compact centrifugal jet engine?

Why do most published works in medical imaging try to reduce false positives?

Construct a word ladder

Is there some hidden joke behind the "it's never lupus" running gag in House?

I unknowingly submitted plagarised work

Website returning plaintext password

How to pull out the underlying query syntax being used by dataset?

Are these reasonable traits for someone with autism?

Simple fuzz pedal using breadboard

Line of lights moving in a straight line , with a few following

Looking for a soft substance that doesn't dissolve underwater

What is quasi-aromaticity?

What is memelemum?

Is CD audio quality good enough?

Simple function that simulates survey results based on sample size and probability

Where is the logic in castrating fighters?

NIntegrate doesn't evaluate

How to respond to an upset student?

Is it rude to call a professor by their last name with no prefix in a non-academic setting?

Why doesn't the Earth accelerate towards the Moon?

Why are C64 games inconsistent with which joystick port they use?

What is the object moving across the ceiling in this stock footage?



Why SSL does not work between my 2 servers?


Where does WHM place .pem files for SSLStartSSL.com SSL Class2 Certificate and PostfixInternet Explorer 8 - TLS Fatal Error Close Notify - Oracle HTTP - Server Apache 2.2.22.0How to configure IIS 7.5 SSL TLS to work with iOS 9 ATSSSL handshake: is the server supposed to choose an earlier protocol?Using Squid to Upgrade TLS Connections to TLS 1.2Handshake in a load balanced system with SSL pass-throughClient did not present a certificate (Postfix)lftp 4.8.4 refuses to talk TLS1.2 with z/OS ftps hostMariadb TLS does not enable






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I have 2 servers with Ubuntu 18.04:



  • monitoring.example.com (with ELK on a single server)

  • www.example.com (with Filebeat)

on the server ELK



Create directories to store SSL certificates



$ sudo mkdir -p /etc/elk-certs



Generate SSL Certificates



$ sudo openssl req -subj '/CN=monitoring.example.com/' -x509 -days 3650 -batch -nodes -newkey rsa:4096 -keyout /etc/elk-certs/monitoring-example-com.key -out /etc/elk-certs/monitoring-example-com.crt



Change the owner



$ sudo chown logstash /etc/elk-certs/monitoring-example-com.crt
$ sudo chown logstash /etc/elk-certs/monitoring-example-com.key


Send the SSL certificate to the client server



$ sudo scp /etc/elk-certs/monitoring-example-com.crt root@22.22.22.222:/tmp


on the server client



Create the directories to store the SSL certificate



$ sudo mkdir -p /etc/elk-certs



Copy the certificate into the directory



$ sudo mv /tmp/monitoring-example-com.crt /etc/elk-certs/


on the server ELK



Here is the configuration file /etc/logstash/conf.d/logstash.conf on the server monitoring.example.com :



input 
beats
port => 5044
ssl => true
ssl_certificate => "/etc/elk-certs/monitoring-example-com.crt"
ssl_key => "/etc/elk-certs/monitoring-example-com.key"


output
elasticsearch
hosts => ["localhost:9200"]
manage_template => false
index => "%[@metadata][beat]-%[@metadata][version]-%+YYYY.MM.dd"




Restart Logstash



$ sudo systemctl restart logstash



on the server client



Here is the configuration file /etc/filebeat/filebeat.yml on the server www.example.com :



#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["monitoring.example.com:5044"]

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
ssl.certificate_authorities: ["/etc/elk-certs/monitoring-example-com.crt"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
#ssl.key: "/etc/elk-certs/monitoring-example-com.key"


Restart Filebeat



$ sudo systemctl restart filebeat



PROBLEM



$ curl -v --cacert /etc/elk-certs/monitoring-example-com.crt https://monitoring.example.com:5044



* Rebuilt URL to: https://monitoring.example.com:5044/
* Trying 2001:43d9:363:1000::2b16...
* TCP_NODELAY set
* Trying 51.95.207.228...
* TCP_NODELAY set
* Connected to monitoring.example.com (51.95.207.228) port 5044 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/elk-certs/monitoring-example-com.crt
CApath: /etc/ssl/certs
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=monitoring.example.com
* start date: May 11 22:26:42 2019 GMT
* expire date: May 8 22:26:42 2029 GMT
* subjectAltName does not match monitoring.example.com
* SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'
* stopped the pause stream!
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
curl: (51) SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'


Currently Logstash does not receive any data from Filebeat.










share|improve this question
























  • I've never dealt with ELK, but does the cert need to have the proper extensions, such as keyUsage = critical, digitalSignature, keyEncipherment or extendedKeyUsage = serverAuth?

    – user3629081
    May 13 at 21:51











  • Can you share the output of a openssl s_client -connect monitoring.example.com:5044?

    – user3629081
    May 14 at 2:18

















1















I have 2 servers with Ubuntu 18.04:



  • monitoring.example.com (with ELK on a single server)

  • www.example.com (with Filebeat)

on the server ELK



Create directories to store SSL certificates



$ sudo mkdir -p /etc/elk-certs



Generate SSL Certificates



$ sudo openssl req -subj '/CN=monitoring.example.com/' -x509 -days 3650 -batch -nodes -newkey rsa:4096 -keyout /etc/elk-certs/monitoring-example-com.key -out /etc/elk-certs/monitoring-example-com.crt



Change the owner



$ sudo chown logstash /etc/elk-certs/monitoring-example-com.crt
$ sudo chown logstash /etc/elk-certs/monitoring-example-com.key


Send the SSL certificate to the client server



$ sudo scp /etc/elk-certs/monitoring-example-com.crt root@22.22.22.222:/tmp


on the server client



Create the directories to store the SSL certificate



$ sudo mkdir -p /etc/elk-certs



Copy the certificate into the directory



$ sudo mv /tmp/monitoring-example-com.crt /etc/elk-certs/


on the server ELK



Here is the configuration file /etc/logstash/conf.d/logstash.conf on the server monitoring.example.com :



input 
beats
port => 5044
ssl => true
ssl_certificate => "/etc/elk-certs/monitoring-example-com.crt"
ssl_key => "/etc/elk-certs/monitoring-example-com.key"


output
elasticsearch
hosts => ["localhost:9200"]
manage_template => false
index => "%[@metadata][beat]-%[@metadata][version]-%+YYYY.MM.dd"




Restart Logstash



$ sudo systemctl restart logstash



on the server client



Here is the configuration file /etc/filebeat/filebeat.yml on the server www.example.com :



#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["monitoring.example.com:5044"]

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
ssl.certificate_authorities: ["/etc/elk-certs/monitoring-example-com.crt"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
#ssl.key: "/etc/elk-certs/monitoring-example-com.key"


Restart Filebeat



$ sudo systemctl restart filebeat



PROBLEM



$ curl -v --cacert /etc/elk-certs/monitoring-example-com.crt https://monitoring.example.com:5044



* Rebuilt URL to: https://monitoring.example.com:5044/
* Trying 2001:43d9:363:1000::2b16...
* TCP_NODELAY set
* Trying 51.95.207.228...
* TCP_NODELAY set
* Connected to monitoring.example.com (51.95.207.228) port 5044 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/elk-certs/monitoring-example-com.crt
CApath: /etc/ssl/certs
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=monitoring.example.com
* start date: May 11 22:26:42 2019 GMT
* expire date: May 8 22:26:42 2029 GMT
* subjectAltName does not match monitoring.example.com
* SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'
* stopped the pause stream!
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
curl: (51) SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'


Currently Logstash does not receive any data from Filebeat.










share|improve this question
























  • I've never dealt with ELK, but does the cert need to have the proper extensions, such as keyUsage = critical, digitalSignature, keyEncipherment or extendedKeyUsage = serverAuth?

    – user3629081
    May 13 at 21:51











  • Can you share the output of a openssl s_client -connect monitoring.example.com:5044?

    – user3629081
    May 14 at 2:18













1












1








1








I have 2 servers with Ubuntu 18.04:



  • monitoring.example.com (with ELK on a single server)

  • www.example.com (with Filebeat)

on the server ELK



Create directories to store SSL certificates



$ sudo mkdir -p /etc/elk-certs



Generate SSL Certificates



$ sudo openssl req -subj '/CN=monitoring.example.com/' -x509 -days 3650 -batch -nodes -newkey rsa:4096 -keyout /etc/elk-certs/monitoring-example-com.key -out /etc/elk-certs/monitoring-example-com.crt



Change the owner



$ sudo chown logstash /etc/elk-certs/monitoring-example-com.crt
$ sudo chown logstash /etc/elk-certs/monitoring-example-com.key


Send the SSL certificate to the client server



$ sudo scp /etc/elk-certs/monitoring-example-com.crt root@22.22.22.222:/tmp


on the server client



Create the directories to store the SSL certificate



$ sudo mkdir -p /etc/elk-certs



Copy the certificate into the directory



$ sudo mv /tmp/monitoring-example-com.crt /etc/elk-certs/


on the server ELK



Here is the configuration file /etc/logstash/conf.d/logstash.conf on the server monitoring.example.com :



input 
beats
port => 5044
ssl => true
ssl_certificate => "/etc/elk-certs/monitoring-example-com.crt"
ssl_key => "/etc/elk-certs/monitoring-example-com.key"


output
elasticsearch
hosts => ["localhost:9200"]
manage_template => false
index => "%[@metadata][beat]-%[@metadata][version]-%+YYYY.MM.dd"




Restart Logstash



$ sudo systemctl restart logstash



on the server client



Here is the configuration file /etc/filebeat/filebeat.yml on the server www.example.com :



#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["monitoring.example.com:5044"]

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
ssl.certificate_authorities: ["/etc/elk-certs/monitoring-example-com.crt"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
#ssl.key: "/etc/elk-certs/monitoring-example-com.key"


Restart Filebeat



$ sudo systemctl restart filebeat



PROBLEM



$ curl -v --cacert /etc/elk-certs/monitoring-example-com.crt https://monitoring.example.com:5044



* Rebuilt URL to: https://monitoring.example.com:5044/
* Trying 2001:43d9:363:1000::2b16...
* TCP_NODELAY set
* Trying 51.95.207.228...
* TCP_NODELAY set
* Connected to monitoring.example.com (51.95.207.228) port 5044 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/elk-certs/monitoring-example-com.crt
CApath: /etc/ssl/certs
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=monitoring.example.com
* start date: May 11 22:26:42 2019 GMT
* expire date: May 8 22:26:42 2029 GMT
* subjectAltName does not match monitoring.example.com
* SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'
* stopped the pause stream!
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
curl: (51) SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'


Currently Logstash does not receive any data from Filebeat.










share|improve this question
















I have 2 servers with Ubuntu 18.04:



  • monitoring.example.com (with ELK on a single server)

  • www.example.com (with Filebeat)

on the server ELK



Create directories to store SSL certificates



$ sudo mkdir -p /etc/elk-certs



Generate SSL Certificates



$ sudo openssl req -subj '/CN=monitoring.example.com/' -x509 -days 3650 -batch -nodes -newkey rsa:4096 -keyout /etc/elk-certs/monitoring-example-com.key -out /etc/elk-certs/monitoring-example-com.crt



Change the owner



$ sudo chown logstash /etc/elk-certs/monitoring-example-com.crt
$ sudo chown logstash /etc/elk-certs/monitoring-example-com.key


Send the SSL certificate to the client server



$ sudo scp /etc/elk-certs/monitoring-example-com.crt root@22.22.22.222:/tmp


on the server client



Create the directories to store the SSL certificate



$ sudo mkdir -p /etc/elk-certs



Copy the certificate into the directory



$ sudo mv /tmp/monitoring-example-com.crt /etc/elk-certs/


on the server ELK



Here is the configuration file /etc/logstash/conf.d/logstash.conf on the server monitoring.example.com :



input 
beats
port => 5044
ssl => true
ssl_certificate => "/etc/elk-certs/monitoring-example-com.crt"
ssl_key => "/etc/elk-certs/monitoring-example-com.key"


output
elasticsearch
hosts => ["localhost:9200"]
manage_template => false
index => "%[@metadata][beat]-%[@metadata][version]-%+YYYY.MM.dd"




Restart Logstash



$ sudo systemctl restart logstash



on the server client



Here is the configuration file /etc/filebeat/filebeat.yml on the server www.example.com :



#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["monitoring.example.com:5044"]

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
ssl.certificate_authorities: ["/etc/elk-certs/monitoring-example-com.crt"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
#ssl.key: "/etc/elk-certs/monitoring-example-com.key"


Restart Filebeat



$ sudo systemctl restart filebeat



PROBLEM



$ curl -v --cacert /etc/elk-certs/monitoring-example-com.crt https://monitoring.example.com:5044



* Rebuilt URL to: https://monitoring.example.com:5044/
* Trying 2001:43d9:363:1000::2b16...
* TCP_NODELAY set
* Trying 51.95.207.228...
* TCP_NODELAY set
* Connected to monitoring.example.com (51.95.207.228) port 5044 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/elk-certs/monitoring-example-com.crt
CApath: /etc/ssl/certs
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=monitoring.example.com
* start date: May 11 22:26:42 2019 GMT
* expire date: May 8 22:26:42 2029 GMT
* subjectAltName does not match monitoring.example.com
* SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'
* stopped the pause stream!
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
curl: (51) SSL: no alternative certificate subject name matches target host name 'monitoring.example.com'


Currently Logstash does not receive any data from Filebeat.







ubuntu security ssl logging elasticsearch






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 22 at 20:21







tropcool

















asked May 13 at 21:21









tropcooltropcool

84




84












  • I've never dealt with ELK, but does the cert need to have the proper extensions, such as keyUsage = critical, digitalSignature, keyEncipherment or extendedKeyUsage = serverAuth?

    – user3629081
    May 13 at 21:51











  • Can you share the output of a openssl s_client -connect monitoring.example.com:5044?

    – user3629081
    May 14 at 2:18

















  • I've never dealt with ELK, but does the cert need to have the proper extensions, such as keyUsage = critical, digitalSignature, keyEncipherment or extendedKeyUsage = serverAuth?

    – user3629081
    May 13 at 21:51











  • Can you share the output of a openssl s_client -connect monitoring.example.com:5044?

    – user3629081
    May 14 at 2:18
















I've never dealt with ELK, but does the cert need to have the proper extensions, such as keyUsage = critical, digitalSignature, keyEncipherment or extendedKeyUsage = serverAuth?

– user3629081
May 13 at 21:51





I've never dealt with ELK, but does the cert need to have the proper extensions, such as keyUsage = critical, digitalSignature, keyEncipherment or extendedKeyUsage = serverAuth?

– user3629081
May 13 at 21:51













Can you share the output of a openssl s_client -connect monitoring.example.com:5044?

– user3629081
May 14 at 2:18





Can you share the output of a openssl s_client -connect monitoring.example.com:5044?

– user3629081
May 14 at 2:18










1 Answer
1






active

oldest

votes


















1














You are missing the SAN record in the certificate.



Generate certificate again with the following commands:



basename=/etc/elk-certs/monitoring-example-com



openssl req -newkey rsa:4096 -nodes -keyout $basename.key -subj "/CN=monitoring.example.com" -out $basename.csr



openssl x509 -req -extfile <(printf "subjectAltName=DNS:monitoring.example.com") -sha256 -days 3650 -in $basename.csr -signkey $basename.key -out $basename.crt



I have added -sha256 above, but you could remove that if you wish



Test the generated certificate:



openssl x509 -in $basename.crt -text -noout


There should be the following data:



Subject: CN=monitoring.example.com

X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:monitoring.example.com


Also ensure to remove comments there:



# Certificate for SSL client authentication
ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
ssl.key: "/etc/elk-certs/monitoring-example-com.key"





share|improve this answer

























  • @tropcool my bad about first suggestion. Still problem is in certificate. It is looking for SAN (Subject Alternative Name). I have updated my answer. The correct certificate should be on the server. But because it is self-signed certificate, client should have it too - as a certificate authority. So it is possible you don't need to uncomment client authentication and client certificate lines, as I advised in answer.

    – Sergey Nudnov
    May 14 at 3:52












  • @tropcool Your certificate has wrong SAN. As of the commands, what did you count second command? openssl x509 -req -extfile?

    – Sergey Nudnov
    May 14 at 11:44











  • @tropcool You could make it with your original command too. Locate the openssl.cnf file and in the [SAN] section in it replace parameter subjectAltName with this subjectAltName=DNS:monitoring.example.com

    – Sergey Nudnov
    May 14 at 11:46











  • @tropcool Do you see the subjectAltName in your openssl.cnf? Was you able to replace it and make the new certificate?

    – Sergey Nudnov
    May 14 at 12:53











  • @tropcool looks good

    – Sergey Nudnov
    May 14 at 13:14











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f967106%2fwhy-ssl-does-not-work-between-my-2-servers%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You are missing the SAN record in the certificate.



Generate certificate again with the following commands:



basename=/etc/elk-certs/monitoring-example-com



openssl req -newkey rsa:4096 -nodes -keyout $basename.key -subj "/CN=monitoring.example.com" -out $basename.csr



openssl x509 -req -extfile <(printf "subjectAltName=DNS:monitoring.example.com") -sha256 -days 3650 -in $basename.csr -signkey $basename.key -out $basename.crt



I have added -sha256 above, but you could remove that if you wish



Test the generated certificate:



openssl x509 -in $basename.crt -text -noout


There should be the following data:



Subject: CN=monitoring.example.com

X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:monitoring.example.com


Also ensure to remove comments there:



# Certificate for SSL client authentication
ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
ssl.key: "/etc/elk-certs/monitoring-example-com.key"





share|improve this answer

























  • @tropcool my bad about first suggestion. Still problem is in certificate. It is looking for SAN (Subject Alternative Name). I have updated my answer. The correct certificate should be on the server. But because it is self-signed certificate, client should have it too - as a certificate authority. So it is possible you don't need to uncomment client authentication and client certificate lines, as I advised in answer.

    – Sergey Nudnov
    May 14 at 3:52












  • @tropcool Your certificate has wrong SAN. As of the commands, what did you count second command? openssl x509 -req -extfile?

    – Sergey Nudnov
    May 14 at 11:44











  • @tropcool You could make it with your original command too. Locate the openssl.cnf file and in the [SAN] section in it replace parameter subjectAltName with this subjectAltName=DNS:monitoring.example.com

    – Sergey Nudnov
    May 14 at 11:46











  • @tropcool Do you see the subjectAltName in your openssl.cnf? Was you able to replace it and make the new certificate?

    – Sergey Nudnov
    May 14 at 12:53











  • @tropcool looks good

    – Sergey Nudnov
    May 14 at 13:14















1














You are missing the SAN record in the certificate.



Generate certificate again with the following commands:



basename=/etc/elk-certs/monitoring-example-com



openssl req -newkey rsa:4096 -nodes -keyout $basename.key -subj "/CN=monitoring.example.com" -out $basename.csr



openssl x509 -req -extfile <(printf "subjectAltName=DNS:monitoring.example.com") -sha256 -days 3650 -in $basename.csr -signkey $basename.key -out $basename.crt



I have added -sha256 above, but you could remove that if you wish



Test the generated certificate:



openssl x509 -in $basename.crt -text -noout


There should be the following data:



Subject: CN=monitoring.example.com

X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:monitoring.example.com


Also ensure to remove comments there:



# Certificate for SSL client authentication
ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
ssl.key: "/etc/elk-certs/monitoring-example-com.key"





share|improve this answer

























  • @tropcool my bad about first suggestion. Still problem is in certificate. It is looking for SAN (Subject Alternative Name). I have updated my answer. The correct certificate should be on the server. But because it is self-signed certificate, client should have it too - as a certificate authority. So it is possible you don't need to uncomment client authentication and client certificate lines, as I advised in answer.

    – Sergey Nudnov
    May 14 at 3:52












  • @tropcool Your certificate has wrong SAN. As of the commands, what did you count second command? openssl x509 -req -extfile?

    – Sergey Nudnov
    May 14 at 11:44











  • @tropcool You could make it with your original command too. Locate the openssl.cnf file and in the [SAN] section in it replace parameter subjectAltName with this subjectAltName=DNS:monitoring.example.com

    – Sergey Nudnov
    May 14 at 11:46











  • @tropcool Do you see the subjectAltName in your openssl.cnf? Was you able to replace it and make the new certificate?

    – Sergey Nudnov
    May 14 at 12:53











  • @tropcool looks good

    – Sergey Nudnov
    May 14 at 13:14













1












1








1







You are missing the SAN record in the certificate.



Generate certificate again with the following commands:



basename=/etc/elk-certs/monitoring-example-com



openssl req -newkey rsa:4096 -nodes -keyout $basename.key -subj "/CN=monitoring.example.com" -out $basename.csr



openssl x509 -req -extfile <(printf "subjectAltName=DNS:monitoring.example.com") -sha256 -days 3650 -in $basename.csr -signkey $basename.key -out $basename.crt



I have added -sha256 above, but you could remove that if you wish



Test the generated certificate:



openssl x509 -in $basename.crt -text -noout


There should be the following data:



Subject: CN=monitoring.example.com

X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:monitoring.example.com


Also ensure to remove comments there:



# Certificate for SSL client authentication
ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
ssl.key: "/etc/elk-certs/monitoring-example-com.key"





share|improve this answer















You are missing the SAN record in the certificate.



Generate certificate again with the following commands:



basename=/etc/elk-certs/monitoring-example-com



openssl req -newkey rsa:4096 -nodes -keyout $basename.key -subj "/CN=monitoring.example.com" -out $basename.csr



openssl x509 -req -extfile <(printf "subjectAltName=DNS:monitoring.example.com") -sha256 -days 3650 -in $basename.csr -signkey $basename.key -out $basename.crt



I have added -sha256 above, but you could remove that if you wish



Test the generated certificate:



openssl x509 -in $basename.crt -text -noout


There should be the following data:



Subject: CN=monitoring.example.com

X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:monitoring.example.com


Also ensure to remove comments there:



# Certificate for SSL client authentication
ssl.certificate: "/etc/elk-certs/monitoring-example-com.crt"

# Client Certificate Key
ssl.key: "/etc/elk-certs/monitoring-example-com.key"






share|improve this answer














share|improve this answer



share|improve this answer








edited May 14 at 3:53

























answered May 14 at 0:37









Sergey NudnovSergey Nudnov

659310




659310












  • @tropcool my bad about first suggestion. Still problem is in certificate. It is looking for SAN (Subject Alternative Name). I have updated my answer. The correct certificate should be on the server. But because it is self-signed certificate, client should have it too - as a certificate authority. So it is possible you don't need to uncomment client authentication and client certificate lines, as I advised in answer.

    – Sergey Nudnov
    May 14 at 3:52












  • @tropcool Your certificate has wrong SAN. As of the commands, what did you count second command? openssl x509 -req -extfile?

    – Sergey Nudnov
    May 14 at 11:44











  • @tropcool You could make it with your original command too. Locate the openssl.cnf file and in the [SAN] section in it replace parameter subjectAltName with this subjectAltName=DNS:monitoring.example.com

    – Sergey Nudnov
    May 14 at 11:46











  • @tropcool Do you see the subjectAltName in your openssl.cnf? Was you able to replace it and make the new certificate?

    – Sergey Nudnov
    May 14 at 12:53











  • @tropcool looks good

    – Sergey Nudnov
    May 14 at 13:14

















  • @tropcool my bad about first suggestion. Still problem is in certificate. It is looking for SAN (Subject Alternative Name). I have updated my answer. The correct certificate should be on the server. But because it is self-signed certificate, client should have it too - as a certificate authority. So it is possible you don't need to uncomment client authentication and client certificate lines, as I advised in answer.

    – Sergey Nudnov
    May 14 at 3:52












  • @tropcool Your certificate has wrong SAN. As of the commands, what did you count second command? openssl x509 -req -extfile?

    – Sergey Nudnov
    May 14 at 11:44











  • @tropcool You could make it with your original command too. Locate the openssl.cnf file and in the [SAN] section in it replace parameter subjectAltName with this subjectAltName=DNS:monitoring.example.com

    – Sergey Nudnov
    May 14 at 11:46











  • @tropcool Do you see the subjectAltName in your openssl.cnf? Was you able to replace it and make the new certificate?

    – Sergey Nudnov
    May 14 at 12:53











  • @tropcool looks good

    – Sergey Nudnov
    May 14 at 13:14
















@tropcool my bad about first suggestion. Still problem is in certificate. It is looking for SAN (Subject Alternative Name). I have updated my answer. The correct certificate should be on the server. But because it is self-signed certificate, client should have it too - as a certificate authority. So it is possible you don't need to uncomment client authentication and client certificate lines, as I advised in answer.

– Sergey Nudnov
May 14 at 3:52






@tropcool my bad about first suggestion. Still problem is in certificate. It is looking for SAN (Subject Alternative Name). I have updated my answer. The correct certificate should be on the server. But because it is self-signed certificate, client should have it too - as a certificate authority. So it is possible you don't need to uncomment client authentication and client certificate lines, as I advised in answer.

– Sergey Nudnov
May 14 at 3:52














@tropcool Your certificate has wrong SAN. As of the commands, what did you count second command? openssl x509 -req -extfile?

– Sergey Nudnov
May 14 at 11:44





@tropcool Your certificate has wrong SAN. As of the commands, what did you count second command? openssl x509 -req -extfile?

– Sergey Nudnov
May 14 at 11:44













@tropcool You could make it with your original command too. Locate the openssl.cnf file and in the [SAN] section in it replace parameter subjectAltName with this subjectAltName=DNS:monitoring.example.com

– Sergey Nudnov
May 14 at 11:46





@tropcool You could make it with your original command too. Locate the openssl.cnf file and in the [SAN] section in it replace parameter subjectAltName with this subjectAltName=DNS:monitoring.example.com

– Sergey Nudnov
May 14 at 11:46













@tropcool Do you see the subjectAltName in your openssl.cnf? Was you able to replace it and make the new certificate?

– Sergey Nudnov
May 14 at 12:53





@tropcool Do you see the subjectAltName in your openssl.cnf? Was you able to replace it and make the new certificate?

– Sergey Nudnov
May 14 at 12:53













@tropcool looks good

– Sergey Nudnov
May 14 at 13:14





@tropcool looks good

– Sergey Nudnov
May 14 at 13:14

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f967106%2fwhy-ssl-does-not-work-between-my-2-servers%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020