github svrforum/NginxProxyGuard v2.45.0

latest releases: v2.72.5, v2.72.4, v2.72.3...
3 months ago

πŸ”΄ μΈμ¦μ„œ β€” μ§€κΈˆ λ°”λ‘œ 확인해 μ£Όμ„Έμš”

κ°±μ‹  λ²„νŠΌμ΄ μΈμ¦μ„œ κ°œμΈν‚€λ₯Ό μ§€μš°κ³  μžˆμ—ˆμŠ΅λ‹ˆλ‹€

SSL μΈμ¦μ„œ ν™”λ©΄μ—μ„œ κ°±μ‹ (Renew) 을 λˆ„λ₯΄λ©΄, NPGκ°€ λ°μ΄ν„°λ² μ΄μŠ€μ— λ³΄κ΄€ν•˜λ˜ μΈμ¦μ„œΒ·κ°œμΈν‚€Β·λ°œκΈ‰μž 체인·Let's Encrypt 계정 정보λ₯Ό μ „λΆ€ λΉ„μ›Œ λ²„λ ΈμŠ΅λ‹ˆλ‹€. 갱신이 μ„±κ³΅ν•˜λ©΄ μƒˆ κ°’μœΌλ‘œ λ‹€μ‹œ μ±„μ›Œμ‘Œμ§€λ§Œ, μ‹€νŒ¨ν•˜λ©΄ μƒνƒœλ§Œ "λ°œκΈ‰λ¨"으둜 되돌렀 놓고 λ‚΄μš©μ€ 빈 μ±„λ‘œ λ‚¨μ•˜μŠ΅λ‹ˆλ‹€.

κ²‰μœΌλ‘œλŠ” 아무 일도 μ—†μ–΄ λ³΄μž…λ‹ˆλ‹€. nginxλŠ” μΈμ¦μ„œλ₯Ό λ°μ΄ν„°λ² μ΄μŠ€κ°€ μ•„λ‹ˆλΌ λ””μŠ€ν¬μ˜ νŒŒμΌμ—μ„œ 읽기 λ•Œλ¬Έμ—, HTTPSλŠ” κ·ΈλŒ€λ‘œ λ™μž‘ν•˜κ³  nginx -t도 ν†΅κ³Όν•©λ‹ˆλ‹€. λ¬Έμ œλŠ” λ‹€μš΄λ‘œλ“œν•˜κ±°λ‚˜, 백업을 λ‹€λ₯Έ μ„œλ²„μ— λ³΅κ΅¬ν•˜κ±°λ‚˜, 갱신이 ν•„μš”ν•΄μ§„ μ‹œμ μ— λ“œλŸ¬λ‚©λ‹ˆλ‹€.

같은 이유둜 "μΈμ¦μ„œ 생성 ν›„ μ¦‰μ‹œ λ‹€μš΄λ‘œλ“œκ°€ μ•ˆ λœλ‹€" λŠ” 증상(#253)도 λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. λ°œκΈ‰ μ§ν›„μ—λŠ” μΊμ‹œμ— κ°œμΈν‚€κ°€ λΉ μ§„ 사본이 남아 μžˆμ–΄μ„œ λ‹€μš΄λ‘œλ“œκ°€ 거뢀됐고, 1λΆ„μ―€ μ§€λ‚˜ μΊμ‹œκ°€ 만료되면 λ‹€μ‹œ λμŠ΅λ‹ˆλ‹€.

직접 μ—…λ‘œλ“œν•œ μΈμ¦μ„œλŠ” 더 μ‹¬κ°ν–ˆμŠ΅λ‹ˆλ‹€. μƒˆ μΈμ¦μ„œ β†’ μ—…λ‘œλ“œλ‘œ λ“±λ‘ν•œ μΈμ¦μ„œλŠ” v1.0.1 이래 ν•œ λ²ˆλ„ ν‚€ λ‚΄μš©μ΄ μ €μž₯된 적이 μ—†μŠ΅λ‹ˆλ‹€. νŒŒμΌμ€ λ””μŠ€ν¬μ— μ •μƒμ μœΌλ‘œ μ €μž₯λμ§€λ§Œ λ°μ΄ν„°λ² μ΄μŠ€ μͺ½μ€ 항상 λΉ„μ–΄ μžˆμ—ˆμŠ΅λ‹ˆλ‹€.

v2.45.0μ—μ„œ μ΄λ ‡κ²Œ λ°”λ€λ‹ˆλ‹€.

  • μƒνƒœλ§Œ λ°”κΎΈλŠ” μ €μž₯κ³Ό ν‚€ λ‚΄μš©μ„ μ“°λŠ” μ €μž₯을 λΆ„λ¦¬ν–ˆμŠ΅λ‹ˆλ‹€. μ–΄λ–€ κ²½λ‘œλ‘œλ„ κΈ°μ‘΄ ν‚€λ₯Ό μ‹€μˆ˜λ‘œ μ§€μšΈ 수 μ—†μŠ΅λ‹ˆλ‹€.
  • κ°œμΈν‚€λ₯Ό 담을 수 μ—†λŠ” μΊμ‹œλ₯Ό μ œκ±°ν–ˆμŠ΅λ‹ˆλ‹€. λ°œκΈ‰ 직후 λ‹€μš΄λ‘œλ“œκ°€ λ°”λ‘œ λ©λ‹ˆλ‹€.
  • μ—…λ‘œλ“œν•œ μΈμ¦μ„œμ˜ ν‚€κ°€ μ •μƒμ μœΌλ‘œ μ €μž₯λ©λ‹ˆλ‹€.
  • 이미 λΉ„μ–΄ 버린 행은 μžλ™μœΌλ‘œ λ³΅κ΅¬λ©λ‹ˆλ‹€. λ‹€μš΄λ‘œλ“œλ₯Ό μ‹œλ„ν•˜λ©΄ λ””μŠ€ν¬μ˜ fullchain.pemΒ·privkey.pem을 λ‹€μ‹œ 읽어 λ°μ΄ν„°λ² μ΄μŠ€λ₯Ό μ±„μš΄ λ’€ νŒŒμΌμ„ λ‚΄λ € μ€λ‹ˆλ‹€.

μ—…κ·Έλ ˆμ΄λ“œ 전에 κ°±μ‹  λ²„νŠΌμ„ λˆ„λ₯΄μ§€ λ§ˆμ„Έμš”. v2.13.18 ~ v2.44.0을 μ“°κ³  계신닀면, μ§€κΈˆ λˆ„λ₯΄λŠ” 갱신이 남아 μžˆλŠ” ν‚€λ₯Ό μ§€μ›λ‹ˆλ‹€. λ¨Όμ € μ—…κ·Έλ ˆμ΄λ“œν•˜μ‹œλ©΄ λ©λ‹ˆλ‹€.

μ—…κ·Έλ ˆμ΄λ“œ ν›„ ν™•μΈν•˜μ‹€ 것 두 κ°€μ§€μž…λ‹ˆλ‹€.

  1. μΈμ¦μ„œ λͺ©λ‘μ—μ„œ 각 μΈμ¦μ„œλ₯Ό ν•œ λ²ˆμ”© λ‹€μš΄λ‘œλ“œν•΄ λ³΄μ„Έμš”. μžλ™ λ°œκΈ‰ μΈμ¦μ„œλŠ” λŒ€λΆ€λΆ„ 이 κ³Όμ •μ—μ„œ 쑰용히 λ³΅κ΅¬λ©λ‹ˆλ‹€.
  2. κ·Έλž˜λ„ "νŒŒμΌλ‘œλ„ 볡ꡬ할 수 μ—†μŠ΅λ‹ˆλ‹€" λΌλŠ” μ•ˆλ‚΄κ°€ λ‚˜μ˜€λŠ” μΈμ¦μ„œλŠ” λ””μŠ€ν¬ νŒŒμΌκΉŒμ§€ μ—†λŠ” κ²½μš°μž…λ‹ˆλ‹€. μžλ™ λ°œκΈ‰μ΄λ©΄ κ°±μ‹ (이제 μ•ˆμ „ν•©λ‹ˆλ‹€), 직접 μ˜¬λ¦¬μ‹  μΈμ¦μ„œλ©΄ ν•΄λ‹Ή μΈμ¦μ„œλ₯Ό μ—΄μ–΄ μˆ˜μ •(Update) μ—μ„œ λ‹€μ‹œ μ—…λ‘œλ“œν•΄ μ£Όμ„Έμš”. μƒˆ μΈμ¦μ„œ μΆ”κ°€λŠ” 별도 ν•­λͺ©μ„ λ§Œλ“€ 뿐 이 μΈμ¦μ„œλ₯Ό κ³ μΉ˜μ§€ λͺ»ν•©λ‹ˆλ‹€.

이 기간에 λ°›μ•„ 두신 λ°±μ—…μ—λŠ” ν‚€κ°€ λΉ„μ–΄ μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€. λ‹€λ₯Έ μ„œλ²„μ— 볡ꡬ할 κ³„νšμ΄ μžˆμœΌμ‹œλ©΄, μ—…κ·Έλ ˆμ΄λ“œν•˜κ³  μœ„ 절차둜 λ³΅κ΅¬ν•œ λ’€ 백업을 λ‹€μ‹œ λ°›μœΌμ‹œκΈΈ κΆŒν•©λ‹ˆλ‹€.

μ°Έκ³ : ν‚€κ°€ λΉ„λ©΄ Let's Encrypt 계정 정보도 ν•¨κ»˜ λΉ„μ›Œμ‘ŒκΈ° λ•Œλ¬Έμ—, κ°±μ‹ ν•  λ•Œλ§ˆλ‹€ 계정을 μƒˆλ‘œ λ“±λ‘ν–ˆμŠ΅λ‹ˆλ‹€. Let's EncryptλŠ” IPλ‹Ή 3μ‹œκ°„μ— 10개둜 μ‹ κ·œ 등둝을 μ œν•œν•˜λ―€λ‘œ, 갱신을 λ°˜λ³΅ν•˜λ‹€ λ°œκΈ‰ μžμ²΄κ°€ λ§‰νž 수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€. 이제 계정 μ •λ³΄λŠ” λ³„λ„λ‘œ λ³΄κ΄€λ˜μ–΄ μž¬μ‚¬μš©λ©λ‹ˆλ‹€.

μ œλ³΄ν•΄ μ£Όμ‹  @heygoodluck λ‹˜ κ°μ‚¬ν•©λ‹ˆλ‹€. (#253)


πŸ—„οΈ λ°±μ—… 볡ꡬ

직접 λ§Œλ“  차단 κ·œμΉ™μ΄ 있으면 볡ꡬ가 ν†΅μ§Έλ‘œ μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€

Exploit 차단 κ·œμΉ™μ„ ν•˜λ‚˜λΌλ„ 직접 λ§Œλ“œμ…¨λ‹€λ©΄, κ·Έ 백업은 λ³΅κ΅¬λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. 볡ꡬ가 HTTP 500κ³Ό ν•¨κ»˜ λ°μ΄ν„°λ² μ΄μŠ€ 였λ₯˜λ₯Ό λ‚΄κ³  전체가 λ‘€λ°±λμŠ΅λ‹ˆλ‹€. λ‚΄μž₯ κ·œμΉ™λ§Œ μžˆλŠ” 백업은 μ •μƒμ΄μ—ˆκΈ° λ•Œλ¬Έμ—, μ“°λŠ” μ‚¬λžŒμ— 따라 λ˜κΈ°λ„ ν•˜κ³  μ•ˆ λ˜κΈ°λ„ ν–ˆμŠ΅λ‹ˆλ‹€.

원인은 μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” μ œμ•½ 쑰건을 μ°Έμ‘°ν•˜λŠ” μ €μž₯ κ΅¬λ¬Έμ΄μ—ˆμŠ΅λ‹ˆλ‹€. μ„€μΉ˜ μ‹œμ μ΄λ‚˜ μ—…κ·Έλ ˆμ΄λ“œ 여뢀와 λ¬΄κ΄€ν•˜κ²Œ μ²˜μŒλΆ€ν„° ν•œ λ²ˆλ„ λ™μž‘ν•œ 적이 μ—†λ˜ κ²½λ‘œμž…λ‹ˆλ‹€. 이제 μ •μƒμ μœΌλ‘œ 볡ꡬ되며, 같은 μ΄λ¦„μ˜ κ·œμΉ™μ΄ μ—¬λŸ¬ 개 μžˆμ–΄λ„ κ·ΈλŒ€λ‘œ μ‚΄μ•„λ‚©λ‹ˆλ‹€.

덀으둜, μ΅œμ‹  λ²„μ „μ—μ„œ 받은 백업을 ꡬ 버전에 볡ꡬ할 λ•Œ λŒ€μƒ μ„€μΉ˜μ— μ—†λŠ” λ‚΄μž₯ κ·œμΉ™μ΄ λ“€μ–΄ 있으면 μ—­μ‹œ 볡ꡬ 전체가 μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€. 이제 그런 κ·œμΉ™κ³Ό 그에 λ”Έλ¦° μ˜ˆμ™Έλ§Œ κ±΄λ„ˆλ›°κ³  λ‚˜λ¨Έμ§€λŠ” λ³΅κ΅¬λ©λ‹ˆλ‹€.

μ œλ³΄ν•΄ μ£Όμ‹  @four2mis λ‹˜ κ°μ‚¬ν•©λ‹ˆλ‹€. (#259)

볡ꡬ가 nginx κΈ°λ³Έ μΈμ¦μ„œλ₯Ό 0λ°”μ΄νŠΈλ‘œ λ§Œλ“€λ˜ 문제

백업에 μΈμ¦μ„œκ°€ 포함돼 있으면, 볡ꡬ가 nginx의 κΈ°λ³Έ μžμ²΄μ„œλͺ… μΈμ¦μ„œλ₯Ό 빈 파일둜 λ§Œλ“€μ–΄ ν”„λ‘μ‹œ μ „μ²΄μ˜ μ„€μ • 검사(nginx -t)λ₯Ό μ‹€νŒ¨μ‹œμΌ°μŠ΅λ‹ˆλ‹€. κ·Έ μƒνƒœμ—μ„œλŠ” 섀정을 λ‹€μ‹œ 뢈러올 수 μ—†μ–΄, μ΄ν›„μ˜ λͺ¨λ“  변경이 λ°˜μ˜λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

νŒŒμΌμ„ λ¨Όμ € λΉ„μš°κ³  λ‚˜μ„œ κΆŒν•œμ„ μ„€μ •ν•˜λŠ” μˆœμ„œμ˜€λŠ”λ°, κ·Έ κΆŒν•œ 섀정이 μ‹€νŒ¨ν•˜λ©΄ λΉ„μš΄ μƒνƒœλ‘œ λλ‚˜ λ²„λ ΈμŠ΅λ‹ˆλ‹€. API μ»¨ν…Œμ΄λ„ˆλŠ” λ³΄μ•ˆμƒ μ΅œμ†Œ κΆŒν•œμœΌλ‘œ λ™μž‘ν•˜κΈ° λ•Œλ¬Έμ—, nginx μ»¨ν…Œμ΄λ„ˆκ°€ λ§Œλ“  νŒŒμΌμ— λŒ€ν•΄μ„œλŠ” 이 κΆŒν•œ 섀정이 항상 μ‹€νŒ¨ν•©λ‹ˆλ‹€.

이제 λ³΅κ΅¬λŠ” μž„μ‹œ νŒŒμΌμ— λ¨Όμ € κΈ°λ‘ν•œ λ’€ ν†΅μ§Έλ‘œ κ΅μ²΄ν•©λ‹ˆλ‹€. μ–΄λ–€ 였λ₯˜κ°€ λ‚˜λ”λΌλ„ κΈ°μ‘΄ νŒŒμΌμ€ μ†μƒλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. κ°œμΈν‚€λ₯Ό λ‹€λ₯Έ μ‚¬μš©μžκ°€ 읽지 λͺ»ν•˜κ²Œ ν•˜λŠ” λ³΄ν˜ΈλŠ” κ·ΈλŒ€λ‘œμ΄λ©°, 였히렀 λ‚΄μš©μ΄ 기둝되기 전에 μ μš©λ©λ‹ˆλ‹€.

이미 이 문제λ₯Ό κ²ͺμœΌμ‹  경우 β€” μ„€μ • 변경이 λ°˜μ˜λ˜μ§€ μ•Šκ±°λ‚˜ nginx -tκ°€ μΈμ¦μ„œλ₯Ό λͺ» μ½λŠ”λ‹€κ³  ν•œλ‹€λ©΄ β€” ν”„λ‘μ‹œ μ»¨ν…Œμ΄λ„ˆλ₯Ό ν•œ 번 μž¬μ‹œμž‘ν•˜λ©΄ κΈ°λ³Έ μΈμ¦μ„œκ°€ λ‹€μ‹œ λ§Œλ“€μ–΄μ§‘λ‹ˆλ‹€.

docker compose restart nginx

🚫 IP 차단 κΈ°κ°„ β€” Fail2ban ν™”λ©΄κΉŒμ§€

μ§€λ‚œ λ²„μ „μ—μ„œ 차단 κΈ°κ°„ λͺ©λ‘μ„ ν•˜λ‚˜λ‘œ ν†΅μΌν•˜λ©΄μ„œ Fail2ban μ„€μ • 화면이 λΉ μ Έ μžˆμ—ˆμŠ΅λ‹ˆλ‹€. μ •μž‘ 처음 말씀해 μ£Όμ‹  화면이 κ·Έμͺ½μ΄μ—ˆλŠ”λ° λ†“μ³€μŠ΅λ‹ˆλ‹€.

이제 Fail2ban 차단 기간도 5λΆ„λΆ€ν„° 30μΌκΉŒμ§€, 그리고 영ꡬ 차단을 λͺ©λ‘μ—μ„œ κ³ λ₯΄μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€.

  • 영ꡬ 차단이 λͺ©λ‘μ— μžˆμŠ΅λ‹ˆλ‹€. μ˜ˆμ „μ—λŠ” 초 λ‹¨μœ„ μž…λ ₯칸에 0을 λ„£μ–΄μ•Ό ν–ˆκ³ , κ·Έ 사싀이 ν™”λ©΄ 어디에도 μ—†μ—ˆμŠ΅λ‹ˆλ‹€. 이제 ν•œκΈ€Β·μ˜μ–΄ μ„€λͺ… λͺ¨λ‘μ— "영ꡬ 차단(0초)은 λ§Œλ£Œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€" 라고 μ ν˜€ μžˆμŠ΅λ‹ˆλ‹€.
  • 30일을 μ§€μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ˜ˆμ „ μž…λ ₯칸은 604800초(7일)κ°€ μƒν•œμ΄λΌ 30일을 μ•„μ˜ˆ ν‘œν˜„ν•  수 μ—†μ—ˆμŠ΅λ‹ˆλ‹€.
  • μ •ν™•ν•œ 초λ₯Ό μ›ν•˜μ‹œλ©΄ 직접 μž…λ ₯(초) 을 κ³ λ₯΄μ‹œλ©΄ λ©λ‹ˆλ‹€. λͺ©λ‘μ— μ—†λŠ” 값이 μ €μž₯돼 있으면 κ·Έ 칸이 μ—΄λ¦° μ±„λ‘œ ν‘œμ‹œλ©λ‹ˆλ‹€.

μ΄λ²ˆμ— ν•¨κ»˜ 고친 것: 첫 μ €μž₯μ—μ„œ 영ꡬ 차단이 μ €μž₯λ˜μ§€ μ•Šλ˜ 버그. ν•΄λ‹Ή ν˜ΈμŠ€νŠΈμ— Fail2ban 섀정이 아직 μ—†λŠ” μƒνƒœμ—μ„œ 영ꡬ 차단을 κ³ λ₯΄λ©΄ 쑰용히 1μ‹œκ°„μœΌλ‘œ λ°”λ€Œμ–΄ μ €μž₯λμŠ΅λ‹ˆλ‹€.

μ œλ³΄ν•΄ μ£Όμ‹  @re-birkin λ‹˜ κ°μ‚¬ν•©λ‹ˆλ‹€. (#252)

μ°Έκ³ : 이미 κ±Έλ € μžˆλŠ” μ°¨λ‹¨μ˜ 기간을 μ€„μ΄λŠ” 경우, 쀄어든 만료 μ‹œκ°μ΄ nginx에 μ¦‰μ‹œ λ°˜μ˜λ˜μ§€λŠ” μ•ŠμŠ΅λ‹ˆλ‹€. λŠ˜λ¦¬λŠ” κ²½μš°μ™€ μƒˆλ‘œ μ°¨λ‹¨ν•˜λŠ” κ²½μš°λŠ” μ¦‰μ‹œ λ°˜μ˜λ©λ‹ˆλ‹€.


πŸ” λ¦¬λ‹€μ΄λ ‰νŠΈ 섀정이 μ‹œμž‘ μ‹œ μ μš©λ˜μ§€ μ•Šλ˜ 문제

API와 nginxλ₯Ό 별도 μ»¨ν…Œμ΄λ„ˆλ‘œ μš΄μ˜ν•˜λŠ” κ΅¬μ„±μ—μ„œ, API만 μ—…κ·Έλ ˆμ΄λ“œΒ·μž¬μ‹œμž‘ν•˜λ©΄ λ¦¬λ‹€μ΄λ ‰νŠΈ 호슀트 섀정이 λ””μŠ€ν¬μ—μ„œλŠ” μ •λ¦¬λ˜λŠ”λ° 이미 λ–  μžˆλŠ” nginxλŠ” μ˜ˆμ „ 섀정을 계속 μ„œλΉ™ν•  수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€. nginxλŠ” 섀정을 μ‹œμž‘ν•˜κ±°λ‚˜ λ‹€μ‹œ 뢈러올 λ•Œ λ©”λͺ¨λ¦¬λ‘œ 읽기 λ•Œλ¬Έμ—, 파일만 μ§€μš°λŠ” κ²ƒμœΌλ‘œλŠ” λ™μž‘μ΄ λ°”λ€Œμ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

이제 μ‹œμž‘ μ‹œ λ¦¬λ‹€μ΄λ ‰νŠΈ 섀정을 λ‹€μ‹œ λ§Œλ“  λ’€, 같은 잠금 μ•ˆμ—μ„œ nginx -t와 μž¬μ μš©κΉŒμ§€ μˆ˜ν–‰ν•©λ‹ˆλ‹€. 검사가 μ‹€νŒ¨ν•˜λ©΄ μž¬μ μš©ν•˜μ§€ μ•Šκ³  이유λ₯Ό λ‚¨κΉλ‹ˆλ‹€.

μ‹œμž‘ μˆœμ„œλ„ ν•¨κ»˜ μ •λ¦¬ν•΄μ„œ, κΈ°λ³Έ μ„œλ²„ μ„€μ •(직접 IP μ ‘κ·Ό 처리 λ“±)도 ν™•μ‹€ν•˜κ²Œ μ μš©λ©λ‹ˆλ‹€. μ˜ˆμ „μ—λŠ” nginxκ°€ 섀정을 μ½λŠ” μ‹œμ κ³Ό κ²ΉμΉ˜λŠ” μš΄μ— κΈ°λŒ€κ³  μžˆμ—ˆμŠ΅λ‹ˆλ‹€.

보고와 μˆ˜μ •μ„ ν•¨κ»˜ 보내 μ£Όμ‹  @heygoodluck λ‹˜ κ°μ‚¬ν•©λ‹ˆλ‹€. (#261)


🧹 μœ μ§€λ³΄μˆ˜

  • 볡ꡬ된 파일의 μ†Œμœ μžκ°€ API μ»¨ν…Œμ΄λ„ˆ κ³„μ •μœΌλ‘œ λ°”λ€λ‹ˆλ‹€. nginxλŠ” κ·ΈλŒ€λ‘œ 읽을 수 μžˆμ–΄ λ™μž‘μ—λŠ” 영ν–₯이 μ—†μŠ΅λ‹ˆλ‹€.
  • Let's Encrypt 계정 μž¬μ‚¬μš© κ²½λ‘œκ°€ 이번 μˆ˜μ •μœΌλ‘œ 처음 μ‹€μ œ λ™μž‘ν•©λ‹ˆλ‹€. κ°±μ‹  κ΄€λ ¨ 이상이 보이면 μ•Œλ € μ£Όμ„Έμš”.
  • TypeScript 7은 아직 λ„μž…ν•  수 μ—†μ–΄(κ΄€λ ¨ lint 도ꡬ가 미지원) μžλ™ μ—…κ·Έλ ˆμ΄λ“œ μ œμ•ˆμ—μ„œ μ œμ™Έν–ˆμŠ΅λ‹ˆλ‹€.

apiΒ·ui 이미지λ₯Ό λͺ¨λ‘ λ°›μ•„ λ‹€μ‹œ 올렀 μ£Όμ„Έμš”.

docker compose pull && docker compose up -d

πŸ”΄ Certificates β€” please read this one

The Renew button was erasing your certificate's private key

Pressing Renew on an SSL certificate made NPG blank the certificate, private key, issuer chain and Let's Encrypt account it keeps in the database. A successful renewal refilled them β€” but a failed one put the status back to "issued" and left the contents empty.

Nothing looks wrong when this happens. nginx serves TLS from the files on disk, not from the database, so HTTPS keeps working and nginx -t still passes. You find out when you download the certificate, restore a backup onto another server, or need to renew.

The same cause produced the reported "can't download a certificate right after creating it" symptom (#253). Just after issuance a cached copy without the key material was being returned, so the download was refused; about a minute later the cache expired and it worked again.

Uploaded certificates were worse. A certificate added through New certificate β†’ Upload has never had its key material stored, since v1.0.1. The files were written to disk correctly, but the database side was always empty.

What changes in v2.45.0

  • Writes that only change status are now separate from writes that store key material, so no path can wipe an existing key.
  • The cache that could not carry a private key is gone, so downloading right after issuance works.
  • Uploaded certificates store their key material.
  • Rows that are already empty repair themselves. Ask for a download and NPG reads fullchain.pem and privkey.pem back from disk, refills the row and serves the file.

Do not press Renew before upgrading. On v2.13.18 – v2.44.0 that press erases whatever key material is left. Upgrade first.

After upgrading, two things are worth doing

  1. Download each certificate once from the list. Most automatically-issued certificates quietly repair themselves in the process.
  2. If a certificate still says its files could not restore it, the files on disk are gone too. For an automatically-issued certificate, press Renew (safe now). For one you uploaded, open it and use Update to upload the certificate and key again β€” adding a new certificate only creates a separate entry and does not fix this one.

Backups taken during this period may contain empty key material. If you plan to restore onto another server, upgrade, repair as above, and take a fresh backup.

Note: because the Let's Encrypt account was blanked along with the key, every renewal attempt registered a brand new account. Let's Encrypt caps new registrations at 10 per IP per 3 hours, so repeated attempts could block issuance entirely. The account is now stored separately and reused.

Thanks to @heygoodluck for the report. (#253)


πŸ—„οΈ Backup restore

Restore failed completely if you had created your own block rules

If you ever created an exploit block rule of your own, that backup would not restore. The restore returned HTTP 500 with a database error and rolled the whole thing back. Backups containing only built-in rules restored fine, which is why some people hit this and others never did.

The cause was a statement referring to a constraint that does not exist β€” a path that has never worked, regardless of install age or upgrade history. Restore now completes, and rules that share a name are all preserved.

Related: restoring a backup taken on a newer version onto an older install also failed outright when it contained a built-in rule the target did not have. Those rules and their exclusions are now skipped and the rest is restored.

Thanks to @four2mis for the report. (#259)

Restore was emptying the nginx default certificate

When a backup contained certificates, restoring it truncated nginx's default self-signed certificate to an empty file, which made the whole proxy fail its configuration test (nginx -t). While in that state nginx cannot reload, so no later change took effect.

The code emptied the destination file first and then set its permissions β€” and when that permission step failed, it stopped there, leaving the file empty. The API container runs with minimal privileges by design, so that step always fails for files created by the nginx container.

Restore now writes to a temporary file and swaps it into place. No failure can damage the existing file. The protection that keeps restored private keys unreadable by others is unchanged, and is now applied before any content is written.

If this already happened to you β€” configuration changes not taking effect, or nginx -t complaining it cannot load the certificate β€” restart the proxy container once and the default certificate is regenerated:

docker compose restart nginx

🚫 Ban durations β€” now on the Fail2ban screen too

The previous release unified the ban-duration list but missed the Fail2ban settings screen β€” which was the screen originally reported.

Fail2ban ban duration is now chosen from the same list: 5 minutes through 30 days, plus permanent.

  • Permanent is in the list. It used to require typing 0 into a seconds box, and nothing on screen said so. Both the Korean and English help text now state that a permanent ban (0 seconds) never expires.
  • 30 days can be selected. The old box capped out at 604800 seconds (7 days), so 30 days could not be expressed at all.
  • Choose Custom (seconds) for an exact number. A stored value that is not one of the offered durations opens on that field.

Fixed along the way: permanent was not saved on the first save. Choosing permanent for a host that had no Fail2ban configuration yet silently stored one hour instead.

Thanks to @re-birkin for the report. (#252)

Note: shortening an existing ban does not push the earlier expiry to nginx immediately. Extending a ban and adding a new one both apply immediately.


πŸ” Redirect configuration was not applied at startup

In deployments where API and nginx are separate containers, upgrading and restarting only the API cleaned up redirect host configuration on disk while an already-running nginx kept serving the old configuration. nginx reads configuration into memory when it starts or reloads, so deleting files alone changes nothing.

Startup now regenerates redirect configuration and then runs nginx -t and applies it within the same lock. If the test fails it does not apply, and it says why.

Startup ordering was tidied at the same time, so the default server configuration (direct-IP handling and similar) is reliably applied too β€” previously it depended on happening to land before nginx read its configuration.

Thanks to @heygoodluck for the report and the fix. (#261)


🧹 Maintenance

  • Restored files are now owned by the API container's account. nginx still reads them, so there is no behavioral change.
  • The Let's Encrypt account-reuse path runs for real for the first time with this fix. Please report anything unusual about renewals.
  • TypeScript 7 cannot be adopted yet (the lint toolchain does not support it), so it is excluded from automatic upgrade proposals.

Pull both the api and ui images and recreate:

docker compose pull && docker compose up -d

Docker Images

docker pull svrforum/nginxproxyguard-api:2.45.0
docker pull svrforum/nginxproxyguard-ui:2.45.0
docker pull svrforum/nginxproxyguard-nginx:2.45.0

Architectures: linux/amd64, linux/arm64

Component Status
API Built
UI Built
Nginx Skipped (no changes)

Contributors: @heygoodluck

Don't miss a new NginxProxyGuard release

NewReleases is sending notifications on new releases.