# Cloudflare 와 Cronjob 을 활용한 무료 DDNS 만들기

> Clean Markdown view of GeekNews topic #16043. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=16043](https://news.hada.io/topic?id=16043)
- GeekNews Markdown: [https://news.hada.io/topic/16043.md](https://news.hada.io/topic/16043.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2024-07-28T09:30:02+09:00
- Updated: 2024-07-28T09:30:02+09:00
- Original source: [github.com/devrim](https://github.com/devrim/cloudflare-noip)
- Points: 24
- Comments: 4

## Summary

무료로 Dynamic DNS 서비스를 설정하는 방법을 배울 수 있습니다. Cloudflare 계정과 크론잡을 활용하여 DNS 레코드를 자동으로 업데이트하는 방법을 설명합니다. 다양한 운영체제에서 Python 코드를 사용하여 설정하는 방법을 제공합니다.

## Topic Body

- NoIP 같은 유료 Dynamic DNS 서비스 만들기   
- 무료 Cloudflare 계정과 본인 컴퓨터/서버의 크론잡을 사용하여 Cloudflare에서 DNS 레코드를 자동으로 업데이트 가능   
- Python 코드  
  - Ubuntu에선 5분마다 실행하는 Cronjob 설정   
  - MacOS에선 launchd 를 활용   
  - Windows에선 Task Scheduler 사용

## Comments



### Comment 27697

- Author: cometkim
- Created: 2024-07-30T22:18:19+09:00
- Points: 1

Cloudflare가 이미 기능으로 제공하는데 너무 돌아가는게 아닌가 싶네요

### Comment 27627

- Author: [hidden]
- Created: 2024-07-28T18:43:09+09:00
- Points: 3

[숨김 처리된 댓글입니다]

### Comment 27605

- Author: xguru
- Created: 2024-07-28T09:31:01+09:00
- Points: 1

비슷한 기능을 하는 쉘스크립트 버전 - https://github.com/ddries/d2c.sh  
Perl 로 작성된 DDClient 는 다양한 DDNS 서비스를 지원 - https://github.com/ddclient/ddclient

### Comment 27619

- Author: xguru
- Created: 2024-07-28T11:12:34+09:00
- Points: 1
- Parent comment: 27605
- Depth: 1

#### [Hacker News 의견](https://news.ycombinator.com/item?id=41081810)   
- Python 런타임을 설치하지 않고 bash 스크립트를 사용하고 싶은 사람들을 위해 만든 도구 소개: [d2c.sh](https://github.com/ddries/d2c.sh) 사용 권장  
- DDNS 대신 Cloudflare 터널을 사용하여 홈 서비스를 인터넷에 노출시키는 방법 설명  
  - 설정이 간단하고 보안성이 높음  
  - 포트를 지정하고 서브도메인에 연결하면 즉시 작동함  
  - 데몬은 한 번만 설치하면 됨  
- 5년 전에 동일한 것을 만들었고 매일 사용 중임  
  - 설정 파일이 필요 없고 몇 가지 CLI 옵션만 있으면 됨  
  - pip, docker 또는 바이너리 다운로드로 설치 가능: [cloudflare-dyndns](https://github.com/kissgyorgy/cloudflare-dyndns)  
- Google Domains DDNS를 사용하던 사람들은 이미 ddclient를 설치했을 것이라고 생각함  
  - ddclient는 Cloudflare와 호환됨: [Cloudflare DDNS 관리](https://developers.cloudflare.com/dns/manage-dns-records/how-to/managing-dynamic-ip-addresses/)  
- Cloudflare와 함께 ddclient를 몇 년 동안 문제 없이 사용해옴  
  - 최근에 홈 라우터를 업그레이드했고 제조사가 제공하는 무료 동적 DNS 서비스를 사용 중임  
  - 도메인의 DNS 레코드에 cname 레코드를 추가했지만, 이제는 필요 없음  
  - 모든 홈 서비스는 Wireguard VPN 연결을 통해서만 원격으로 접근 가능함  
  - 라우터가 900Mbs의 Wireguard 트래픽을 처리할 수 있고 훌륭한 VPN 서버 관리 기능을 제공함  
- DDNS 클라이언트가 dyndns를 지원하지만 Cloudflare를 지원하지 않는 경우, Cloudflare Worker를 어댑터로 사용할 수 있음: [unifi-ddns](https://github.com/willswire/unifi-ddns)  
- Docker 컨테이너를 제공하는 프로젝트 사용 경험 공유: [cloudflare-ddns](https://github.com/timothymiller/cloudflare-ddns)  
- 공용 IP를 확인하기 위해 [api.ipify.org](https://api.ipify.org/)를 사용하는 것 같음  
  - Cloudflare 서비스로 IP를 확인할 수 있는 방법이 있는지 궁금함  
- afraid.org가 몇 년 동안 해오던 것과 다르지 않음  
  - FreeBSD를 4년 동안 탐구하게 됨  
  - 원하는 것을 얻기 위해 Debian의 Proxmox로 교체해야 했던 점이 아쉬움  
- NoIP와 DynDNS 같은 유료 서비스의 구식 소프트웨어에 의존하는 것에 지친 사람들을 위해, 무료 Cloudflare 계정과 함께 사용할 수 있는 간단한 스크립트 추천  
  - 자신의 도메인 이름으로 홈 서버를 관리하는 신뢰할 수 있는 방법 제공
