Posts

Showing posts from March, 2022

How to generate .crt file from scratch using puttygen under windows

This passage will be short and to the point, as most basic info can be found online.  I just point out the necessary info.  Here are the steps: Download and install puttygen, then generate a public/private key pair. Reference: https://www.ssh.com/academy/ssh/putty/windows/puttygen You should have two .ppk files: one for private key and one for public key.   Convert your .ppk private key file to base64/pem format.  You can name it either in .pem or .key.  They are both referring to the same thing.   Reference: https://www.tbs-certificates.co.uk/FAQ/en/putty-ppk-vers-openssl-openssh.html You should have 1 .pem (or .key) file now, generated from your private key. Generate a 10 years .crt file with the following command: openssl req -new -x509 -key my_private.pem -out my_cert.pem -days 3650 -subj "/C=HK/ST=HK/L=HK/O=MyCompany/OU=My_organization/CN=mysite.com" You should have a my_cert.pem file now Convert your .pem cert to .crt cert using this command: openssl crl2pkcs7 -nocrl -c

[Solve] Cloudflare MX record - SMTP Mail Server Connection Timeout

Situation: - You enable Cloudflare on your domain - You cannot send email out from your domain.  Error: (Connection) timeout. - You are sure that the server is running OK. Problems: - In Cloudflare DNS, there is an "A" record with name = "mail", the proxy status is set to "Proxied" Solution: Please check the following: - In Cloudflare DNS, there is a "MX" record, make sure name is "@" (or called root), and "content" is your mail server domain name. In Cloudflare, it will convert your @ to <your_domain>.com automatically.  And your "content" would be something like mail.abcde.com. Proxy status needs to be "DNS Only" - There should be another "A" record, "name" is "mail", make sure your Proxy status is set to "DNS Only", not "Proxied". Update and test again.  It should work. -- Hope it helps someone.