개인 WireGuard VPN은 서버, 키, 로그가 모두 당신 것입니다. 이것은 수동 설정 가이드입니다. 상용 VPN 대비 트레이드오프, 한 명령 wg-easy 경로, DPI 유의점은 WireGuard 자체 호스팅과 VPN용 VPS 사용 사례를 보세요. 전용 IP 요금제가 필요합니다 — WireGuard는 인바운드 UDP 포트에서 수신합니다.
1. WireGuard 설치 및 서버 키 만들기
apt update && apt install -y wireguard
wg genkey | tee /etc/wireguard/server.key | wg pubkey > /etc/wireguard/server.pub
chmod 600 /etc/wireguard/server.key
2. 서버 설정 작성
# /etc/wireguard/wg0.conf
[Interface]
Address = 10.8.0.1/24
ListenPort = 51820
PrivateKey = <contents of /etc/wireguard/server.key>
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer] # your phone/laptop
PublicKey = <client public key — see step 4>
AllowedIPs = 10.8.0.2/32
3. 포워딩 켜고 시작하기
sysctl -w net.ipv4.ip_forward=1
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
ufw allow 51820/udp
systemctl enable --now wg-quick@wg0
wg show
4. 클라이언트 키 생성 및 연결
클라이언트에서(또는 서버에서 생성해 옮기기):
wg genkey | tee client.key | wg pubkey > client.pub
client.pub를 위의 [Peer] 블록에 넣고(그 다음 systemctl restart wg-quick@wg0), 클라이언트에 이 설정을 주세요:
[Interface]
PrivateKey = <client.key>
Address = 10.8.0.2/32
DNS = 1.1.1.1
[Peer]
PublicKey = <server.pub>
Endpoint = YOUR.SERVER.IP:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
WireGuard 앱에 가져오고(모바일에서는 qrencode -t ansiutf8 < client.conf로 QR이 가장 빠름) 켜면 — 당신의 서버를 통해 라우팅됩니다.
참고
- DPI 뒤(이란/중국/러시아)? WireGuard는 지문 인식되어 차단됩니다 — 대신 VLESS + Reality를 쓰세요.
- 웹 UI를 선호? 한 명령 wg-easy 경로가 QR 코드 관리 패널로 이를 설정해 줍니다.
Nano-IP(월 $8)면 충분하고, 트래픽 무제한, 약 1분이면 root, KYC 없음, 암호화폐로 결제.
댓글
아직 댓글이 없습니다. 첫 번째가 되세요.