Skip to content

Instantly share code, notes, and snippets.

@renchap
renchap / README.md
Last active October 12, 2022 17:14
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {

IPsec with ip command

ip コマンドを使った IPsec 通信の設定方法を説明する。 以下で紹介する方法は

  • 事前に何らかの方法で鍵を共有する必要がある
  • リピート攻撃を防ぐために鍵を定期的に更新するための仕組みが必要となる

という問題があるため、真面目な用途に使う場合はちゃんと IKE とかを使ったほうがよいと思う。

マレーシア旅程案

  • 細かな日時や金額は2016-10-20(木)から2016-10-24(月)を仮定したときのもの
    • 平日と週末で Sanrio Town のスケジュールが微妙に違うので、両方味わえるように金曜と土曜にインパできるように
    • ローシーズンで、シンガポールとマレーシアが祝日にぶつかっていなければ他の時でも同じ程度の時間や金額になるはず
    • シンガポールの宿泊費はピンキリなので★2ホテルの最安値で大人2人分を2で割った
  • 金額の合計は700SGDと400MYRで60000JPY相当
    • 1SGD=75.02JPY, 1MYR=24.72JPY

木曜