Skip to main content

Pembahasan LKS ITNSA Ceritificate Authority

 Pada tutorial kali ini akan membahas cara konfigurasi bagaimana membangun self signed CA yang akan menjadi sumber sertifikat untuk keamanan layanan server seperti HTTPS, SMTPS, VPN, dll.

Contoh soal

Certificate Authority

● Access CA and Configure CA to issue required Certificates by Linux Services

○ Common Name : LKSN2021-CA

○ Do not join this server to any domain.

● Generate certificates required by other services with the following DNS name:

○ www.sabang.net

○ *.public.sabang.net

○ www.merauke.net

○ *.merauke.net

○ Save these certificates and their private keys as one pfx file in C:\cert\

○ Use Skills39 as export password

○ Use the DNS name as filename :

■ www.sabang.net.pfx

■ public.sabang.net.pfx

■ www.merauke.net.pfx

■ wildcard.merauke.net.pfx


Opsi 1 pakai Linux dengan OpenSSL

Untuk mengkonfigurasi Authority Sertifikat (CA) untuk mengeluarkan sertifikat untuk layanan Linux, Anda dapat menggunakan alat seperti OpenSSL, yang merupakan perpustakaan sumber terbuka yang banyak digunakan untuk komunikasi SSL/TLS. Berikut adalah gambaran singkat tentang langkah-langkah yang perlu Anda lakukan untuk mengkonfigurasi CA Anda dan menghasilkan sertifikat yang dibutuhkan:

  1. Buat kunci private CA baru dan sertifikat root yang digandakan sendiri:
openssl req -new -x509 -days 3650 -keyout private/ca.key -out ca.crt -subj "/CN=LKSN2021-CA"
  1. Buat direktori untuk menyimpan sertifikat server dan kunci
mkdir -p private
  1. Buat sertifikat server dan kunci private dan tanda tangani dengan CA Anda:
openssl req -new -keyout private/www.sabang.net.key -out www.sabang.net.csr -subj "/CN=www.sabang.net"
openssl x509 -req -days 365 -in www.sabang.net.csr -CA ca.crt -CAkey private/ca.key -set_serial 01 -out www.sabang.net.crt
  1. Ulangi langkah 3 untuk nama DNS lainnya:
openssl req -new -keyout private/*.public.sabang.net.key -out *.public.sabang.net.csr -subj "/CN=*.public.sabang.net"
  1. Buat file pfx dan sertakan kunci private
openssl pkcs12 -export -out www.sabang.net.pfx -inkey private/www.sabang.net.key -in www.sabang.net.crt -password pass:Skills39
  1. Ulangi langkah 5 untuk nama DNS lainnya dan simpan file pfx ke C:\cert\

Catatan: Ini adalah langkah yang diperpendek dan skenario dunia nyata akan lebih kompleks dengan langkah validasi dan keamanan tambahan yang harus dilakukan.


Opsi 2 Pakai windows server CA

Berikut adalah jika mengunakan CA dari Windows Server menggunakan powershell


You can use PowerShell to configure a Windows Server as a CA (Certificate Authority) and issue certificates for your Linux services. Here's an overview of the steps you would need to take to set up your Windows Server CA and generate the required certificates:

  1. Install the Active Directory Certificate Services (AD CS) role on your Windows Server. You can use the Add Roles and Features wizard in the Server Manager, or you can use PowerShell with the following command:
Add-WindowsFeature AD-Certificate
  1. Use the Certutil command-line tool to configure your CA by following the prompt to complete the installation process:
certutil -setreg ca\csp\CNGHashAlgorithm SHA256
  1. Configure the CA to issue the certificate templates that you need by using the Certutil command-line tool
certutil -setreg ca\TemplateCertStoreName "CertificateAuthority\Certificate Templates"
  1. Use the Certreq command-line tool to request a new certificate
certreq -new c:\certs\www.sabang.net.inf c:\certs\www.sabang.net.req

This will create a file named www.sabang.net.req

  1. Use the Certreq command-line tool to submit the request to the CA, and retrieve the issued certificate:
certreq -submit -attrib "CertificateTemplate:WebServer" c:\certs\www.sabang.net.req c:\certs\www.sabang.net.crt
  1. Use the Certreq command-line tool to install the issued certificate to the LocalMachine\My certificate store
certreq -accept c:\certs\www.sabang.net.crt
  1. Repeat steps 4 to 6 for the other DNS names

  2. export the crt files in pfx format with a passwod

$pwd = ConvertTo-SecureString -String "Skills39" -Force -AsPlainText Export-PfxCertificate -Cert "Cert:\LocalMachine\My\$($thumbprint)" -FilePath "C:\certs\www.sabang.net.pfx" -Password $pwd
  1. Repeat step 8 for the other DNS names




*Good Luck*



Comments

Popular posts from this blog

Soal dan pembahasan LKSN ITNSA

Berikut adalah koleksi soal-soal ITNSA dan beberapa website yang memberikan pembahasan pada event perlombaaan LKS SMK Nasional bidang lomba IT Network Systems Administration. 2014 Palembang Di tahun ini ada 1 soal packet tracer. Di website dibawah ini diberikan juga cara pembahasannya. https://agussas.wordpress.com/2015/04/02/review-soal-lks-nasional-it-network-23-packet-tracer-challenge/ Semua soal:  https://www.dropbox.com/sh/l90zyke2ib5msgv/AAA3kPOFo-zEn4wPOW4a3iMwa?dl=0 dan https://drive.google.com/file/d/18lDhtMjAnPAhkfOJ6uFHsC5j6ycg3K4I/view Pembahasan juga dalam bentuk video di youtube:  https://www.youtube.com/watch?v=8QML594nQBU 2015 Banten Pembahasan:   https://www.youtube.com/watch?v=quDbpC2xSfQ Soal:  https://drive.google.com/file/d/1B09IYfdoGENBL3txSQodpptG1zdQxBWI/view 2016 Malang Soal:   https://drive.google.com/file/d/13-2bRtb5IXO9vxAhLfhghZbDXeUzD0FI/view Pembahasan:   https://www.youtube.com/watch?v=zmUSUZguH24 2017 Solo Soal dan pembahasan

Pembahasan Soal CA LKS Nasional ITNSA 2022

 Berikut adalah salah satu soal mengenai CA dan pembahasannya, silakan dicoba dan sesuikan dengan kondisi real sebenarnya pada saat kompetisi, karena mungkin di kota, provinsi atau soal nasional selanjutnya ada perubahan seperti kalimat, lokasi folder, nama server dan penamaan lainnya Silakan sesuaikan nama file, nama domain, dll. Certificate Authority  ● Configure MAIL as Root CA.  1.  openssl genrsa -out root.key 4096 ○ Use Common Name: LKSN2022-Root  2.  openssl req -new -x509 -days 1826 -key root.key -out root.crt ○ Approve Intermediate CA Requests for MON1 and MON2. Jawaban ada di perintah 4 dan 6  ○ Save those two Intermediate CA certificate files without the key in directory /backup in MAIL server.  Ini cukup kopikan file mon1.crt dan mon2.crt ke /backup Bikin config untuk Intermediatte CA, bisa mencontoh di /etc/ssl/openssl.cnf juga. Disini simple cukup membuat konfigurasi seperti dibawah ini buat file subca.cnf berisi: [ req ] extensions    = v3_subca req_extensions    = v3

ITNSA Konfigurasi Ansible WinRM Windows Server

 ### Mengonfigurasi Koneksi Ansible ke Server Windows Ansible adalah alat otomatisasi yang sangat populer dan sering digunakan untuk mengelola berbagai jenis server, termasuk server Windows. Artikel ini akan memandu Anda melalui langkah-langkah untuk mengonfigurasi Ansible agar dapat terhubung dengan server Windows menggunakan WinRM (Windows Remote Management). #### 1. Menyiapkan WinRM di Server Windows ##### Opsi 1: Menggunakan Skrip PowerShell Anda bisa menggunakan skrip PowerShell yang sudah disediakan untuk mengonfigurasi WinRM agar dapat digunakan oleh Ansible. 1. Buka PowerShell di server Windows Anda sebagai administrator. 2. Jalankan perintah berikut untuk mengunduh dan mengeksekusi skrip konfigurasi:    ```powershell    iex (New-Object Net.WebClient).DownloadString('https://github.com/ansible/ansible/raw/devel/examples/scripts/ConfigureRemotingForAnsible.ps1')    ``` ##### Opsi 2: Pengaturan Manual 1. Buka PowerShell di server Windows Anda sebagai administrator. 2. Jal