WireGuard
lastmod 2026-01-23created 2021-08-0516 edits
WireGuard is a communication protocol and free and open-source software that implements encrypted virtual private networks, designed with the goals of ease of use, high-speed performance, and a low attack surface. It aims for better performance and power savings than the IPsec and OpenVPN tunneling protocols.
Seems to be P2P-based
WireGuardNT
A high-performance WireGuard implementation for the Windows kernel
- Ports WireGuard for Linux to use the Windows NT kernel and NDIS (Windows networking stack) APIs
- Supports Windows 7,9,8.1,10 and AMD64,x86,ARM64
- The existing wireguard-go, running on top of Wintun, runs in userspace, but WireGuardNT runs deeply integrated with the networking stack, as it does on Linux/BSD
- Achieves ~7.5Gbps TX even on a small test machine, but further optimization should be possible
- Since Windows users' Ethernet connections don't even reach 1Gbps, the existing slow wireguard-go wasn't a big problem, but performance over WiFi was poor
- ~600Mbps without WireGuard,
- ~600Mbps with wireguard-go/Wintun over Ethernet,
- ~95Mbps with wireguard-go/Wintun over WiFi,
- ~600Mbps with WireGuardNT over WiFi
- Since Windows users' Ethernet connections don't even reach 1Gbps, the existing slow wireguard-go wasn't a big problem, but performance over WiFi was poor
WireGuard Endpoint Discovery and NAT Traversal using DNS-SD
Building a server
Setting up with an ASUS router
Setting up with an IpTime router
- Using WireGuard VPN on an ipTIME router : Naver Blog
- How to set up and use the ipTIME router WireGuard server – Windows | Customer Support - FAQ | EFM - ipTIME
Client Install
Key points:
-
/etc/wireguard/wg0.confmust be set to 600 permissions - iptables rules are applied automatically when using wg-quick
- Starts automatically on boot once enabled with systemd
Directory structure after basic installation
Creating and placing the configuration file
# wg0.conf 파일을 /etc/wireguard/ 디렉토리에 배치
sudo cp your-config.conf /etc/wireguard/wg0.conf
# 올바른 권한 설정 (매우 중요)
sudo chmod 600 /etc/wireguard/wg0.conf
sudo chown root:root /etc/wireguard/wg0.conf
Activating the WireGuard interface
# 방법 1: wg-quick 사용 (권장)
sudo wg-quick up wg0
# 방법 2: systemd 서비스로 관리
sudo systemctl enable wg-quick@wg0
sudo systemctl start wg-quick@wg0
# 상태 확인
sudo wg show
Applying and checking the configuration
# WireGuard 인터페이스 상태 확인
ip addr show wg0
# WireGuard 상세 정보 확인
sudo wg show wg0
# 네트워크 라우팅 확인
ip route show
Reapplying after changing the configuration
# conf 파일 수정 후
sudo nano /etc/wireguard/wg0.conf
# 인터페이스 재시작
sudo wg-quick down wg0
sudo wg-quick up wg0
# 또는 systemd 재시작
sudo systemctl restart wg-quick@wg0
Troubleshooting
# 서비스 로그 확인
sudo journalctl -u wg-quick@wg0 -f
# systemd-networkd 사용 시
sudo systemctl status systemd-networkd
# iptables 규칙 확인 (필요시)
sudo iptables -L -n
resolvconf: command not found
Just install resolvconf:
conf file example
[Interface]
# 로컬 private key 설정
PrivateKey = <your-private-key>
# WireGuard 인터페이스 IP 주소
Address = 10.0.0.1/24
# 필요시 DNS 설정
DNS = 8.8.8.8
# 리슨 포트
ListenPort = 51820
[Peer]
# 상대방 public key
PublicKey = <peer-public-key>
# 상대방 IP 범위
AllowedIPs = 10.0.0.2/32
# 상대방 엔드포인트 (선택사항)
Endpoint = example.com:51820
conf example exported from IpTime
[Interface]
PrivateKey = ~~~~~
Address = 10.10.100.3/24
DNS = 210.220.163.82
[Peer]
PublicKey = ~~~~~
AllowedIps = 0.0.0.0/0
Endpoint = name.iptime.org:65430
PresharedKey = ~~~~~
wg-quick
See Wg-quick for details.
See also
- VPN
- IPsec
- OpenVPN
- FireZone - WireGuard-based VPN server & firewall
- tailscale
- nebula
- Wintun - Layer 3 TUN Driver for Windows
Favorite site
- WireGuard: fast, modern, secure VPN tunnel
- Wikipedia (en) WireGuard
- WireGuard - Namuwiki
- Installing WireGuard with Docker on an Ubuntu server
- Using WireGuard VPN on an ipTIME router to access a NAS on the internal network : Naver Blog
- What is a WireGuard VPN server? : Naver Blog
- Building a great VPN server with WireGuard - 1
- Setting up a Wireguard VPN the easy way
- A fun explanation of the WireGuard protocol - speed and performance advantages
- WireGuard vs OpenVPN vs I.. : Naver Blog
Pages that link here