Switches: Difference between revisions

From Hobbynet Admin Wiki
Jump to navigation Jump to search
Line 53: Line 53:
zet gedownload bestand bij de andere cerificate files bij voorkeur met zelfde naam en extentie cer
zet gedownload bestand bij de andere cerificate files bij voorkeur met zelfde naam en extentie cer
=== zet de private key om naar RSA private key ===
=== zet de private key om naar RSA private key ===
   openssl rsa -in cisco-sw-st-02.key -outform pem >cisco-sw-st-02.pubkey
   openssl rsa -in cisco-sw-st-02.key -outform pem >cisco-sw-st-02.rsakey
 
=== zet het certificaat om in public RSA keys ===
=== zet het certificaat om in public RSA keys ===
   openssl x509 -pubkey -noout -in ./cisco-sw-st-02.cer  >./cisco-sw-st-02.pubkey
   openssl x509 -pubkey -noout -in ./cisco-sw-st-02.cer  >./cisco-sw-st-02.pubkey

Revision as of 20:00, 26 October 2020

certificaten

Dit is de juiste procedure om certificaten aan maken

aanmaken met openssl

san.cnf

Om te zorgen dat je het cerificaat goed kan aanmaken, moet je zorgen dat je alt subjects goed hebt staan, daar voor config file nodig ie er zo uit ziet:

  [ req ]
  default_bits       = 2048
  distinguished_name = req_distinguished_name
  req_extensions     = req_ext
  [ req_distinguished_name ]
  countryName                 = NL
  stateOrProvinceName         = Noord-Holland
  localityName               = Haarlem
  organizationName           = HCC
  commonName                 = Common Name (e.g. server FQDN or YOUR name)
  [ req_ext ]
  subjectAltName = @alt_names
  [alt_names]
  DNS.1   = cisco-sw-st-02.hobby.nl
  DNS.2   = cisco-sw-st-02.network.hobby.nl
  IP.1    = 172.31.1.114
  IP.2    = 2a02:968:ffff:999:172:31:1:114
  IP.3    = 192.168.200.156
  IP.4    = 192.168.200.157

Bij dns naam vul nog keer de aanvraag dns naam in, en je vult eventuele aliassen in, ook voeg je ip addressen toe, hier staan 2 192.168.200.* adressen in omdat ze bij mijn thuis geconfigureerd zijn en zo had ik geen last van foutmeldingen. Vergeet het IPv6 adres niet!

maak het certificaat request

  bas@pc-bas:/mnt/c/Users/bas/certs$ openssl req -out cisco-sw-st-02.csr -new -newkey rsa:4096 -sha256 -nodes -keyout cisco-sw-st-02.key -config ./san.cnf
  Generating a RSA private key
  ......................................................++++
  ..........................................................................................................................................++++
  writing new private key to 'cisco-sw-st-02.key'
  -----
  You are about to be asked to enter information that will be incorporated
  into your certificate request.
  What you are about to enter is what is called a Distinguished Name or a DN.
  There are quite a few fields but you can leave some blank
  For some fields there will be a default value,
  If you enter '.', the field will be left blank.
  -----
  NL []:
  Noord-Holland []:
  Haarlem []:
  HCC []:
  Common Name (e.g. server FQDN or YOUR name) []:cisco-sw-st-02.network.hobby.nl

Voltooi de aanvraag via windows ad http://ad1.ad.hobby.nl/certsrv (ja http)
Request a certificate --> advanced certificate request
kies bij template webserver
paste de inhoud van csr file (certificate request)
klik op submint
zet rondje op Base 64 encoded
en klik op download certficate
zet gedownload bestand bij de andere cerificate files bij voorkeur met zelfde naam en extentie cer

zet de private key om naar RSA private key

  openssl rsa -in cisco-sw-st-02.key -outform pem >cisco-sw-st-02.rsakey

zet het certificaat om in public RSA keys

  openssl x509 -pubkey -noout -in ./cisco-sw-st-02.cer  >./cisco-sw-st-02.pubkey