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

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company