C.W.K.
Stream
Lesson 07 of 12 · published

MagicDNS

~10 min · magicdns, tailscale, hostnames

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

IP 대신 hostname

MagicDNS 와 함께 Tailscale 장치를 이름으로 도달 — short 또는 fully-qualified. 머신이 "office" 로 등록됐으면 office(short) 또는 office.tail-net.ts.net(FQDN) 로 도달 가능. MagicDNS 가 새 tailnet 디폴트로 활성화됐고 Tailscale 이 제공하는 단일 최고 ergonomics 승리.

Code

MagicDNS 동작·bash
# All of these work once MagicDNS is enabled:
ssh you_username@office
ssh you_username@office.tail-net.ts.net
ping server
curl http://server:8080
rsync -avz ./ office:/home/you_username/project/

# Check that MagicDNS is on for your tailnet
tailscale status   # entries show short names

# Resolve a tailnet hostname manually
dig +short office.tail-net.ts.net
~/.ssh/config 에 박기 (Track 3)·ssh-config
# Tailscale aliases
Host ts-*
    User you_username

Host ts-office
    HostName office.tail-net.ts.net
Host ts-server
    HostName server.tail-net.ts.net
Host ts-music
    HostName music.tail-net.ts.net

# Or, if you also want the short name to work everywhere:
Host office server music
    User you_username
    # MagicDNS resolves these short names directly

External links

Exercise

Tailscale 연결된 장치 둘에서 ping <short-hostname>ssh <short-hostname> 시도. 둘 다 동작해야. 100.x.y.z IP 사용과 비교 — 같은 결과. ~/.ssh/config 업데이트해서 Tailscale alias 에 IP 대신 MagicDNS 이름 사용.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.