Back to list
dev_to 2026年3月14日

WireGuard と OpenVPN:自己ホスティングにどの VPN を選ぶか?

WireGuard vs OpenVPN: Which VPN to Self-Host?

Translated: 2026/3/14 11:18:16
wireguardopenvpnself-hostedvpn-comparisonlinux-kernel

Japanese Translation

結論 大多数の自己ホスターにとって、WireGuard が望ましい選択肢です。高速であり、設定が簡単で、オーバーヘッドが低く、Linux カーネルに組み込まれています。OpenVPN は依然としてニッチな利点があります——より良いファームウォール通過性(TCP サポート)、より詳細な設定オプション、そして古くからのシステムにおけるより広いクライアント互換性——しかし自己ホスティングの使用例の 90% に対しては、WireGuard が勝利します。 WireGuard は、シンプルさとパフォーマンスのために地元の設計から作成された現代の VPN プロトコルです。5.6 版の Linux カーネルに含まれており、最先端の暗号化(Curve25519、ChaCha20、Poly1305)を使用し、コードベースは約 4,000 行です。設定は単純な INI 形式のファイルです。 OpenVPN は 2001 年より標準の自己ホスティング VPN ソリューションでした。ユーザースペース上で実行され、UDP と TCP の両方に対応し、膨大な設定オプションを持ち、完全な PKI インフラストラクチャーを含む証明書ベースの認証を使用します。数千万の展開で試されました。 特性 WireGuard OpenVPN プロトコル UDP 専用 UDP と TCP 暗号化 ChaCha20-Poly1305、Curve25519 OpenSSL (AES-256-GCM、RSA など) コードベース ~4,000 行 ~100,000+ 行 カーネル統合 はい (Linux 5.6+) いいえ (ユーザースペース) 速度(トルックループ) 800-900 Mbps 典型 200-400 Mbps 典型 遅延 低い 高い 接続確立 即座に(ステートレス) 5-10 秒(ハンドシェイク) 設定 簡単(INI ファイル) 複雑(多くのオプション) 証明書管理 なし(キーペア) 完全な PKI 必須 TCP サポート いいえ はい ファームウォール通過 UDP 51820 専用 TCP 443(スティール) NAT 通過 組み込み(キープアリブ) 組み込み ユーザーごとの帯域幅制限 なし はい 動的 IP 割り当て 静的のみ(設定に) はい(DHCP 様) クライアントへのプッシュルーティング いいえ(クライアント側のみ) はい(サーバープッシュ) ロギング 設計上の最小限 詳細 監査履歴 形式的に確認済み 複数の監査 クライアントサポート 最も現代的な OS ほぼすべて WireGuard はカーネルモジュールとしてインストールされており(最も現代的な Linux ディストリビューションで既にあり)、または Docker 経由です。設定は 1 つのペア毎のファイルです。キーペアを作成し、ピアを定義し、完了です。証明書当局、PKI、TLS 協商なし。基本的なセットアップは 10-15 分かります。当社の WireGuard セットアップガイドをご覧ください。 より簡単でさらなる体験のために、wg-easy—移動クライアント用の QR コードを生成し、WireGuard 設定を管理するウェブ UI を使用してください。 OpenVPN は証明書当局を含む公衆鍵インフラ(PKI)をセットアップし、サーバーとクライアントの証明書を生成し、サーバーを数十個のオプションで設定し、クライアントに .ovpn 設定ファイルを配布する必要があります。30-60 分は最低限計画してください。easy-rsa のようなツールも手助けしますが、それでもそれなりに複雑です。 メトリック WireGuard OpenVPN トルックループ (1 Gbps リンク) 800-900 Mbps 200-400 Mbps トンネルごとの CPU 使用量 最小限(カーネルスペース) 中程度(ユーザースペース) RAM 使用量 ~2 MB 毎トンネル ~20-50 MB 毎トンネル 接続時間 <100 ms 5-10 秒 バッテリー影響(モバイル) 低い 中程度-高い WireGuard のカーネル統合が、主要な差別化要素です。コンテキストスイッチなしにカーネルスペースでパケットを処理するため、2-4 倍の高いトルックループと著しく低い CPU 使用量が生じます。モバイルデバイスでは、これは著しくより良いバッテリー寿命に翻訳されます。 WireGuard は現代的で偏った暗号化を使用します:キー交換のための Curve25519、対称暗号化のための ChaCha20-Poly1305、ハッシュ化のための BLAKE2s。 cipher 協商はありません—one algorithm の脆弱性が見つかる場合、プロトコルバージョン全体が更新されます。小さなコードベース(~4,000 行)は形式的確認を実践的なものにします。 OpenVPN は OpenSSL を通じて幅広い cipher をサポートします。この柔軟性により、最新のアルゴリズムを使用できますが、誤設定が可能(弱い cipher、古くなった TLS バージョン)。大規模なコードベースは歴史的により多くの CVE を経験しましたが、それは大きく監査されています。 プライバシーの差異:WireGuard は接続がアクティブであることをユーザーの IP アドレスをメモリに保存します。これは匿名性のために VPN を使用している場合に懸念事項です。

Original Content

Quick Verdict WireGuard is the better choice for most self-hosters. It's faster, simpler to configure, has lower overhead, and is built into the Linux kernel. OpenVPN still has niche advantages — better firewall traversal (TCP support), more granular configuration, and wider client compatibility on older systems — but for 90% of self-hosting use cases, WireGuard wins. WireGuard is a modern VPN protocol designed from the ground up for simplicity and performance. It's built into the Linux kernel since 5.6, uses state-of-the-art cryptography (Curve25519, ChaCha20, Poly1305), and has a codebase of roughly 4,000 lines. Configuration is a simple INI-like file. OpenVPN has been the standard self-hosted VPN solution since 2001. It runs in userspace, supports both UDP and TCP, has extensive configuration options, and uses certificate-based authentication with a full PKI infrastructure. It's battle-tested across millions of deployments. Feature WireGuard OpenVPN Protocol UDP only UDP and TCP Encryption ChaCha20-Poly1305, Curve25519 OpenSSL (AES-256-GCM, RSA, etc.) Codebase ~4,000 lines ~100,000+ lines Kernel integration Yes (Linux 5.6+) No (userspace) Speed (throughput) 800-900 Mbps typical 200-400 Mbps typical Latency Lower Higher Connection establishment Instant (stateless) 5-10 seconds (handshake) Configuration Simple (INI file) Complex (many options) Certificate management None (key pairs) Full PKI required TCP support No Yes Firewall traversal UDP 51820 only TCP 443 (stealth) NAT traversal Built-in (keepalive) Built-in Per-user bandwidth limits No Yes Dynamic IP assignment Static only (in config) Yes (DHCP-like) Push routes to clients No (client-side only) Yes (server pushes) Logging Minimal by design Detailed Audit history Formally verified Multiple audits Client support Most modern OS Nearly everything WireGuard is installed as a kernel module (already present on most modern Linux distros) or via Docker. Configuration is a single file per peer. You generate a key pair, define peers, and you're done. No certificate authority, no PKI, no TLS negotiation. A basic setup takes 10-15 minutes. See our WireGuard setup guide. For an even simpler experience, use wg-easy — a web UI that manages WireGuard configuration and generates QR codes for mobile clients. OpenVPN requires setting up a Public Key Infrastructure (PKI) with a certificate authority, generating server and client certificates, configuring the server with dozens of options, and distributing .ovpn config files to clients. Plan for 30-60 minutes minimum. Tools like easy-rsa help, but it's still more involved. Metric WireGuard OpenVPN Throughput (1 Gbps link) 800-900 Mbps 200-400 Mbps CPU usage per tunnel Minimal (kernel-space) Moderate (userspace) RAM usage ~2 MB per tunnel ~20-50 MB per tunnel Connection time <100 ms 5-10 seconds Battery impact (mobile) Low Moderate-High WireGuard's kernel integration is the key differentiator. It processes packets in kernel space without context switches to userspace, resulting in 2-4x higher throughput and significantly lower CPU usage. On mobile devices, this translates to noticeably better battery life. WireGuard uses modern, opinionated cryptography: Curve25519 for key exchange, ChaCha20-Poly1305 for symmetric encryption, BLAKE2s for hashing. There's no cipher negotiation — if a vulnerability is found in one algorithm, the entire protocol version is updated. The small codebase (~4,000 lines) makes formal verification practical. OpenVPN supports a wide range of ciphers through OpenSSL. This flexibility means you can use the latest algorithms, but misconfiguration is possible (weak ciphers, outdated TLS versions). The large codebase has had more CVEs historically, though it's been heavily audited. Privacy difference: WireGuard stores peer IP addresses in memory while a connection is active. This is a concern if you're using a VPN for anonymity (commercial VPN providers have worked around this with NAT). For self-hosted VPN (connecting to your home network), this isn't a meaningful issue — you know who's connecting. This is OpenVPN's remaining killer feature. WireGuard uses UDP only, which is blocked by some corporate firewalls, airports, and restrictive networks. OpenVPN can run over TCP port 443, making it indistinguishable from HTTPS traffic — it works almost everywhere. If you need VPN access from networks that block UDP, OpenVPN over TCP is your best option. Alternatively, pair WireGuard with Cloudflare Tunnel or use Tailscale which includes relay servers for traversal. WireGuard: Backed by Jason Donenfeld and the WireGuard project. Included in the Linux kernel. Active development, strong community, excellent documentation. Every major VPN provider and network tool now supports WireGuard. OpenVPN: Backed by OpenVPN Inc. Massive community with 20+ years of deployment experience. Extensive documentation, forums, and commercial support options. The project is mature and stable, with slower release cadence. Performance matters (high throughput, low latency) You want the simplest possible setup You're connecting to your home network from mobile devices (battery life) You run modern Linux (kernel 5.6+) You don't need TCP transport You value a small, auditable codebase You want instant connections (no handshake delay) You need TCP support for restrictive firewalls (corporate, airport, hotel) You need per-user bandwidth controls You need detailed connection logging You support legacy clients (Windows 7, older Android, embedded devices) You need the server to push routes and DNS to clients You need certificate-based authentication with revocation WireGuard for almost everything. It's faster, simpler, lighter, and built into the kernel. For self-hosted remote access to your home network, WireGuard is the right choice. The only scenario where OpenVPN wins is firewall traversal: if you regularly connect from networks that block UDP, OpenVPN over TCP port 443 is the reliable fallback. Some self-hosters run both — WireGuard as the primary VPN and OpenVPN as a backup for restrictive networks. If WireGuard's bare-bones configuration is too manual for you, use wg-easy for a web UI, or Tailscale/Headscale for a zero-config mesh network built on WireGuard. Not natively. WireGuard is UDP-only by design. You can tunnel WireGuard over TCP using tools like udp2raw or wstunnel, but this adds complexity and overhead. If TCP is a hard requirement, use OpenVPN. No. WireGuard uses modern cryptography and has a smaller attack surface. Its formal verification and small codebase make security auditing more practical. Both are secure when properly configured. Yes, but they use different protocols, so it's not a direct migration. Set up WireGuard alongside OpenVPN, migrate clients one at a time, then decommission OpenVPN. Both can run simultaneously on different ports. Not natively. Each peer gets a static IP defined in the config file. If you need dynamic assignment, use Tailscale or Headscale which handle IP management automatically on top of WireGuard. WireGuard. Its low overhead and high throughput make it ideal for site-to-site links. Configure AllowedIPs on both sides to route between subnets. How to Self-Host WireGuard How to Self-Host wg-easy Tailscale vs WireGuard Headscale vs Tailscale Best Self-Hosted VPN Solutions Self-Hosted Alternatives to NordVPN Cloudflare Tunnel Setup