AmneziaWG
Keywords
| Keyword | Definition |
|---|---|
| ð¡ïž AmneziaWG | A fork of WireGuard that randomizes packet headers, sizes, and timing to resist Deep Packet Inspection while keeping the same audited cryptography. It is the protocol that runs on your server. |
| ð AmneziaWG 2.0 | The current major version that uses dynamic header ranges (instead of fixed values), adds data-level padding (S4), and supports Custom Protocol Signature decoy packets for stronger DPI evasion. |
| ð Deep Packet Inspection (DPI) | A network filtering technique used by ISPs and governments to identify and block VPN traffic by analyzing packet headers, sizes, and handshake patterns. AmneziaWG is specifically designed to defeat it. |
| â¡ WireGuard | A fast, modern VPN protocol with a small codebase and kernel-level performance. It is easily fingerprinted by DPI systems due to its fixed packet structure, which is what AmneziaWG was built to fix. |
| ð Self-hosted VPN | A VPN you deploy and manage on your own server (typically a VPS) rather than subscribing to a commercial provider. You control the keys, config, and infrastructure. |
| ð§ DKMS (Dynamic Kernel Module Support) | A Linux framework that automatically recompiles kernel modules when the system kernel is updated. The AmneziaWG installer uses DKMS to build the high-performance kernel module. |
| ð Obfuscation | The practice of disguising VPN traffic to look like ordinary internet traffic. AmneziaWG obfuscates at the transport layer by randomizing headers, adding padding, sending decoy packets, and firing junk packets. |
| ð Split tunneling | A routing configuration where only specific traffic (e.g., blocked sites) goes through the VPN while the rest uses your direct connection. Useful in countries with partial censorship. |
| ð¥ïž KVM vs LXC | KVM is full virtualization with a dedicated kernel, required for loading custom kernel modules like AmneziaWG. LXC is container-based virtualization that shares the host kernel and cannot load custom modules. |
| ðª CPS (Custom Protocol Signature) | An AmneziaWG 2.0 feature that sends decoy packets mimicking other protocols (QUIC, DNS, SIP) before the real handshake, fooling DPI systems into classifying the traffic as normal. |
Self-Host an AmneziaWG VPN Server â Complete Guide

AmneziaWG is a protocol designed to solve a specific problem: how do you get WireGuard’s speed when the networks you’re connecting through actively try to block it? It’s a fork of WireGuard built by the Amnezia VPN team, and it does one thing that the original doesn’t â it randomizes the transport layer so Deep Packet Inspection systems can’t fingerprint it. The encryption underneath stays exactly the same. What changes is how the packets look on the wire.
The broader landscape of VPN obfuscation has been an arms race for years. Tools like Shadowsocks, VLESS+Reality, and OpenVPN with obfs4 all attempt to disguise traffic in different ways â some as proxies, some as full tunnels, some with heavy performance costs. AmneziaWG sits in a specific niche: it’s a full VPN tunnel with WireGuard-level performance and built-in DPI resistance, all in one package. And since it’s open-source, you can self-host it on your own server.
But here’s the problem that makes this necessary. You set up WireGuard. It works perfectly â fast, clean, reliable. Then one day it stops. No error message, no timeout, no connection refused. The packets just vanish. That’s what DPI blocking looks like in practice: your tunnel is still running, your config is still correct, and nothing gets through. This is the reality in Russia (where WireGuard has roughly a 12% success rate), Iran (98% packet loss), and a growing list of countries including China, Egypt, UAE, Turkey, Belarus, Uzbekistan, Kazakhstan, Myanmar, and Pakistan.

Traditional alternatives don’t fully solve this. Shadowsocks is a proxy, not a full VPN tunnel â your DNS and non-TCP traffic still leak. OpenVPN with obfs4 works but carries roughly 25% performance overhead. VLESS+Reality offers strong obfuscation but is proxy-based and complex to configure. AmneziaWG fills the gap: a complete VPN tunnel with WireGuard’s speed and DPI resistance baked in.
This guide walks you through deploying a fully functional AmneziaWG 2.0 server on any KVM VPS in under 15 minutes using a single community installer script. By the end, you’ll have a working VPN tunnel you can connect to from any device. The steps are provider-agnostic â they work on any VPS with root SSH access, whether that’s from AlexHost, AvaHost, or elsewhere. This is written for intermediate tech users who are comfortable with SSH and basic Linux commands.
One clarification before we start: AmneziaWG is the protocol. AmneziaVPN is the client app that connects to it. They’re related but distinct â like TLS is to your browser. You’ll need the app to connect, but the protocol is what runs on your server.
But before we deploy anything, you need to understand what makes AmneziaWG different from WireGuard â and why that difference matters when DPI is watching.
What Is AmneziaWG? (The Mental Model)
WireGuard is elegant by design. It has a small codebase, uses modern cryptography, and runs in the Linux kernel for near-native performance. But that elegance comes with a visibility problem: every WireGuard packet carries the same fixed header structure, the same fixed packet sizes, and the same handshake pattern. To a Deep Packet Inspection system, a WireGuard tunnel has a signature as clear as a barcode. Once a DPI box learns that signature, it can drop every packet without blocking the port or closing the connection.

Think of it this way. WireGuard is like a courier who always wears the same uniform â fast, reliable, and efficient. But anyone watching the road learns to recognize that uniform and can stop the courier at any checkpoint. AmneziaWG is the same courier carrying the same packages, but they change uniforms at every checkpoint. Same person, same cargo, completely different appearance.
The version history matters here. AmneziaWG 1.x introduced custom headers that differed from WireGuard’s fixed values â it helped for a while, but DPI systems adapted. AmneziaWG 2.0, released in late 2025, randomizes everything: headers change per packet, padding varies per message, and decoy packets mimic other protocols before the real handshake begins. There is no universal signature to detect because every AmneziaWG 2.0 server generates its own unique parameter set. Each server speaks its own dialect.
When all obfuscation parameters are set to zero, AmneziaWG behaves identically to WireGuard â it’s fully backward compatible at the protocol level. But with parameters active (which is the default), it becomes something WireGuard cannot be: a fast VPN tunnel that DPI systems struggle to identify.
So how exactly does AmneziaWG scramble its traffic? Let’s look at the four obfuscation layers that make DPI blind â and why they add almost no speed cost.
How AmneziaWG Hides From DPI (Without Losing Speed)
AmneziaWG 2.0 uses four layered obfuscation techniques that work together. Each one targets a different way DPI systems identify VPN traffic. Together, they make every server’s traffic look unique.
Dynamic Headers (H1âH4)
WireGuard uses fixed 32-bit message type identifiers:
- 1 â for initiation
- 2 â for response
- 3 â for cookie reply
- 4 â for data
A DPI box scanning traffic just looks for these values. AmneziaWG 2.0 replaces each fixed value with a random number drawn from a configured range. The initiation header (H1) might be any value between 234567 and 345678. The response header (H2) might be between 3456789 and 4567890. These ranges never overlap â the protocol still needs to distinguish packet types internally â but to an outside observer, there’s no single header value to latch onto. Every packet looks different from the last.
Random Padding (S1âS4)
WireGuard’s initiation packet is always exactly 148 bytes. Its response is always exactly 92 bytes. These fixed sizes are another fingerprint. AmneziaWG adds random padding to each packet type: the initiation becomes 148+S1 bytes, the response becomes 92+S2 bytes, the cookie reply becomes 64+S3 bytes, and every data packet gets S4 bytes of padding. S3 and S4 are new in version 2.0 â and S4 is the most significant addition because it touches every single data packet, making session-wide traffic analysis much harder.
There’s one critical constraint: S1+56 must not equal S2. Since the original size difference between initiation and response is 56 bytes (148â92), if the padding values happened to compensate for exactly that difference, the two padded packets would end up the same size â recreating the fingerprint AmneziaWG is trying to eliminate. The installer’s parameter generator enforces this constraint automatically.
Custom Protocol Signature (I1âI5)
Before the real WireGuard handshake begins, the AmneziaWG client sends up to five decoy packets that mimic other protocols â QUIC, DNS, SIP, or custom byte patterns. The server ignores these packets entirely. It just waits for the real handshake.
- A simple configuration: Sends 128 random bytes <r 128>.
- A sophisticated configuration: Sends bytes that look like a QUIC connection initiation (<b 0xc000000001><r 64><t>), complete with a Unix timestamp.
To a DPI system watching the session start, the first packets look like normal web traffic.
Junk Packets (Jc, Jmin, Jmax)
After the decoy packets, the client fires a configurable number of junk packets â pure noise with random sizes between Jmin and Jmax. These blur the timing and size profile of the session start, making it harder for DPI systems to identify where the real handshake begins.
The Speed Question
There’s a number that’s been circulating online: AmneziaWG has 65% overhead. That figure is real, but it refers to the userspace Go implementation â not the kernel module. The community installer used in this guide builds a DKMS kernel module, and the kernel module adds less than 12% overhead total â closer to 3% in real-world benchmarks. On an uncensored network, you’d see roughly 95 Mbps through WireGuard and 92 Mbps through AmneziaWG 2.0. In a censored network, the comparison is 92 Mbps versus zero.
The following table summarizes the parameters the installer generates automatically:
| Parameter | Generated Range | Example Value |
|---|---|---|
Jc (junk packet count) | 4â8 | 6 |
Jmin (min junk size) | 40â89 | 55 |
Jmax (max junk size) | Jmin+100 to Jmin+500 | 380 |
S1 (init padding) | 15â150 | 72 |
S2 (response padding) | 15â150, S1+56â S2 | 56 |
S3 (cookie padding) | 8â55 | 32 |
S4 (data padding) | 4â27 | 16 |
H1 (init header range) | uint32 non-overlapping | 234567-345678 |
H2 (response header range) | uint32 non-overlapping | 3456789-4567890 |
H3 (cookie header range) | uint32 non-overlapping | 56789012-67890123 |
H4 (data header range) | uint32 non-overlapping | 456789012-567890123 |
I1 (CPS packet) | <r N> format | <r 128> |
You don’t need to set any of these manually. The installer generates cryptographically random, constraint-valid values every time.
Now that you know how the obfuscation works, let’s see how AmneziaWG stacks up against the alternatives you might be considering.
AmneziaWG vs Alternatives â Quick Decision Guide

| WireGuard | AmneziaWG 2.0 | OpenVPN+obfs4 | Shadowsocks | VLESS+Reality | |
|---|---|---|---|---|---|
| DPI resistance | Low | High | Medium | Medium | Very High |
| Speed overhead | ~4% | <12% (~3% real-world) | ~25% | ~8% | ~10% |
| Full VPN tunnel | Yes | Yes | Yes | No (proxy) | No (proxy) |
| Runs in kernel | Yes | Yes (DKMS) | No | No | No |
| Setup complexity | Low | Low (with installer) | High | Medium | High |
| Transport | UDP | UDP | TCP/UDP | TCP | TCP |
The decision rules are straightforward:
- No DPI in your country? Use plain WireGuard. It’s simpler and has a larger ecosystem.
- Need maximum DPI resistance and OK with a proxy? VLESS+Reality is the strongest option for obfuscation, but it’s not a full tunnel.
- Want both speed and a full tunnel with obfuscation? AmneziaWG 2.0 is the only option that delivers WireGuard-grade performance with real DPI resistance in a complete VPN tunnel.
- Already using OpenVPN+obfs4 and it still works? No urgent need to switch, but AmneziaWG will be noticeably faster.
This article focuses on AmneziaWG because it’s the only protocol that gives you a full tunnel, kernel-level performance, and built-in obfuscation â all configured by a single script.
If AmneziaWG is the right choice for your situation, here’s exactly what you need before we start deploying.
What You’ll Need Before Starting
Before running the installer, make sure your environment meets these requirements:
| Requirement | Detail | Why |
|---|---|---|
| OS | Ubuntu 24.04 LTS (clean install). Ubuntu 25.10 is experimental. Debian 12/13 work but may needcurl pre-installed. | The installer is tested and fully supported on Ubuntu 24.04. |
| VPS specs | 1 vCore, 1 GB RAM, 25 GB storage. Any $3â5/month plan works. | The installer needs ~2 GB disk and ~1 GB RAM during the DKMS build. The running VPN uses negligible resources. |
| Virtualization | KVM (not OpenVZ, not LXC). | AmneziaWG loads a kernel module via DKMS. LXC shares the host kernel and cannot load custom modules. |
| SSH access | Root or sudo user with password/key authentication. | The installer must run as root. |
| SSH port | Default 22, or pre-opened in UFW if using a non-standard port. | If SSH isn’t on port 22 and you don’t pre-open it, the installer’s firewall setup will lock you out. |
| Client app | Amnezia VPN >= 4.8.12.7 (all platforms). | AWG 2.0 parameters are not understood by older clients. The standard WireGuard client does not support AWG at all. |
â ïž Warning: LXC containers are not supported. If your VPS uses LXC virtualization, the DKMS kernel module build will fail. You must use KVM or bare-metal. Check with your provider if you’re unsure.
â ïž Warning: If your SSH runs on a non-standard port (anything other than 22), you must open it in UFW before running the installer:
sudo ufw allow YOUR_PORT/tcpReplace
YOUR_PORTwith your actual SSH port. The installer enables UFW with a default-deny policy â if your SSH port isn’t allowed, you’ll be locked out immediately.
ð¡ Tip: Wait 5â10 minutes after creating your VPS before running the installer. Cloud-init and background initialization processes can conflict with the
apt-getcalls the installer makes.
With your VPS ready and prerequisites confirmed, let’s deploy AmneziaWG 2.0 using the community installer script â the fastest and most transparent method.
Keywords
| Keyword | Definition |
|---|---|
| ð¡ïž AmneziaWG | A fork of WireGuard that randomizes packet headers, sizes, and timing to resist Deep Packet Inspection while keeping the same audited cryptography. It is the protocol that runs on your server. |
| ð AmneziaWG 2.0 | The current major version that uses dynamic header ranges (instead of fixed values), adds data-level padding (S4), and supports Custom Protocol Signature decoy packets for stronger DPI evasion. |
| ð Deep Packet Inspection (DPI) | A network filtering technique used by ISPs and governments to identify and block VPN traffic by analyzing packet headers, sizes, and handshake patterns. AmneziaWG is specifically designed to defeat it. |
| â¡ WireGuard | A fast, modern VPN protocol with a small codebase and kernel-level performance. It is easily fingerprinted by DPI systems due to its fixed packet structure, which is what AmneziaWG was built to fix. |
| ð Self-hosted VPN | A VPN you deploy and manage on your own server (typically a VPS) rather than subscribing to a commercial provider. You control the keys, config, and infrastructure. |
| ð§ DKMS (Dynamic Kernel Module Support) | A Linux framework that automatically recompiles kernel modules when the system kernel is updated. The AmneziaWG installer uses DKMS to build the high-performance kernel module. |
| ð Obfuscation | The practice of disguising VPN traffic to look like ordinary internet traffic. AmneziaWG obfuscates at the transport layer by randomizing headers, adding padding, sending decoy packets, and firing junk packets. |
| ð Split tunneling | A routing configuration where only specific traffic (e.g., blocked sites) goes through the VPN while the rest uses your direct connection. Useful in countries with partial censorship. |
| ð¥ïž KVM vs LXC | KVM is full virtualization with a dedicated kernel, required for loading custom kernel modules like AmneziaWG. LXC is container-based virtualization that shares the host kernel and cannot load custom modules. |
| ðª CPS (Custom Protocol Signature) | An AmneziaWG 2.0 feature that sends decoy packets mimicking other protocols (QUIC, DNS, SIP) before the real handshake, fooling DPI systems into classifying the traffic as normal. |
Self-Host an AmneziaWG VPN Server â Complete Guide

AmneziaWG is a protocol designed to solve a specific problem: how do you get WireGuard’s speed when the networks you’re connecting through actively try to block it? It’s a fork of WireGuard built by the Amnezia VPN team, and it does one thing that the original doesn’t â it randomizes the transport layer so Deep Packet Inspection systems can’t fingerprint it. The encryption underneath stays exactly the same. What changes is how the packets look on the wire.
The broader landscape of VPN obfuscation has been an arms race for years. Tools like Shadowsocks, VLESS+Reality, and OpenVPN with obfs4 all attempt to disguise traffic in different ways â some as proxies, some as full tunnels, some with heavy performance costs. AmneziaWG sits in a specific niche: it’s a full VPN tunnel with WireGuard-level performance and built-in DPI resistance, all in one package. And since it’s open-source, you can self-host it on your own server.
But here’s the problem that makes this necessary. You set up WireGuard. It works perfectly â fast, clean, reliable. Then one day it stops. No error message, no timeout, no connection refused. The packets just vanish. That’s what DPI blocking looks like in practice: your tunnel is still running, your config is still correct, and nothing gets through. This is the reality in Russia (where WireGuard has roughly a 12% success rate), Iran (98% packet loss), and a growing list of countries including China, Egypt, UAE, Turkey, Belarus, Uzbekistan, Kazakhstan, Myanmar, and Pakistan.

Traditional alternatives don’t fully solve this. Shadowsocks is a proxy, not a full VPN tunnel â your DNS and non-TCP traffic still leak. OpenVPN with obfs4 works but carries roughly 25% performance overhead. VLESS+Reality offers strong obfuscation but is proxy-based and complex to configure. AmneziaWG fills the gap: a complete VPN tunnel with WireGuard’s speed and DPI resistance baked in.
This guide walks you through deploying a fully functional AmneziaWG 2.0 server on any KVM VPS in under 15 minutes using a single community installer script. By the end, you’ll have a working VPN tunnel you can connect to from any device. The steps are provider-agnostic â they work on any VPS with root SSH access, whether that’s from AlexHost, AvaHost, or elsewhere. This is written for intermediate tech users who are comfortable with SSH and basic Linux commands.
One clarification before we start: AmneziaWG is the protocol. AmneziaVPN is the client app that connects to it. They’re related but distinct â like TLS is to your browser. You’ll need the app to connect, but the protocol is what runs on your server.
But before we deploy anything, you need to understand what makes AmneziaWG different from WireGuard â and why that difference matters when DPI is watching.
What Is AmneziaWG? (The Mental Model)
WireGuard is elegant by design. It has a small codebase, uses modern cryptography, and runs in the Linux kernel for near-native performance. But that elegance comes with a visibility problem: every WireGuard packet carries the same fixed header structure, the same fixed packet sizes, and the same handshake pattern. To a Deep Packet Inspection system, a WireGuard tunnel has a signature as clear as a barcode. Once a DPI box learns that signature, it can drop every packet without blocking the port or closing the connection.

Think of it this way. WireGuard is like a courier who always wears the same uniform â fast, reliable, and efficient. But anyone watching the road learns to recognize that uniform and can stop the courier at any checkpoint. AmneziaWG is the same courier carrying the same packages, but they change uniforms at every checkpoint. Same person, same cargo, completely different appearance.
The version history matters here. AmneziaWG 1.x introduced custom headers that differed from WireGuard’s fixed values â it helped for a while, but DPI systems adapted. AmneziaWG 2.0, released in late 2025, randomizes everything: headers change per packet, padding varies per message, and decoy packets mimic other protocols before the real handshake begins. There is no universal signature to detect because every AmneziaWG 2.0 server generates its own unique parameter set. Each server speaks its own dialect.
When all obfuscation parameters are set to zero, AmneziaWG behaves identically to WireGuard â it’s fully backward compatible at the protocol level. But with parameters active (which is the default), it becomes something WireGuard cannot be: a fast VPN tunnel that DPI systems struggle to identify.
So how exactly does AmneziaWG scramble its traffic? Let’s look at the four obfuscation layers that make DPI blind â and why they add almost no speed cost.
How AmneziaWG Hides From DPI (Without Losing Speed)
AmneziaWG 2.0 uses four layered obfuscation techniques that work together. Each one targets a different way DPI systems identify VPN traffic. Together, they make every server’s traffic look unique.
Dynamic Headers (H1âH4)
WireGuard uses fixed 32-bit message type identifiers:
- 1 â for initiation
- 2 â for response
- 3 â for cookie reply
- 4 â for data
A DPI box scanning traffic just looks for these values. AmneziaWG 2.0 replaces each fixed value with a random number drawn from a configured range. The initiation header (H1) might be any value between 234567 and 345678. The response header (H2) might be between 3456789 and 4567890. These ranges never overlap â the protocol still needs to distinguish packet types internally â but to an outside observer, there’s no single header value to latch onto. Every packet looks different from the last.
Random Padding (S1âS4)
WireGuard’s initiation packet is always exactly 148 bytes. Its response is always exactly 92 bytes. These fixed sizes are another fingerprint. AmneziaWG adds random padding to each packet type: the initiation becomes 148+S1 bytes, the response becomes 92+S2 bytes, the cookie reply becomes 64+S3 bytes, and every data packet gets S4 bytes of padding. S3 and S4 are new in version 2.0 â and S4 is the most significant addition because it touches every single data packet, making session-wide traffic analysis much harder.
There’s one critical constraint: S1+56 must not equal S2. Since the original size difference between initiation and response is 56 bytes (148â92), if the padding values happened to compensate for exactly that difference, the two padded packets would end up the same size â recreating the fingerprint AmneziaWG is trying to eliminate. The installer’s parameter generator enforces this constraint automatically.
Custom Protocol Signature (I1âI5)
Before the real WireGuard handshake begins, the AmneziaWG client sends up to five decoy packets that mimic other protocols â QUIC, DNS, SIP, or custom byte patterns. The server ignores these packets entirely. It just waits for the real handshake.
- A simple configuration: Sends 128 random bytes <r 128>.
- A sophisticated configuration: Sends bytes that look like a QUIC connection initiation (<b 0xc000000001><r 64><t>), complete with a Unix timestamp.
To a DPI system watching the session start, the first packets look like normal web traffic.
Junk Packets (Jc, Jmin, Jmax)
After the decoy packets, the client fires a configurable number of junk packets â pure noise with random sizes between Jmin and Jmax. These blur the timing and size profile of the session start, making it harder for DPI systems to identify where the real handshake begins.
The Speed Question
There’s a number that’s been circulating online: AmneziaWG has 65% overhead. That figure is real, but it refers to the userspace Go implementation â not the kernel module. The community installer used in this guide builds a DKMS kernel module, and the kernel module adds less than 12% overhead total â closer to 3% in real-world benchmarks. On an uncensored network, you’d see roughly 95 Mbps through WireGuard and 92 Mbps through AmneziaWG 2.0. In a censored network, the comparison is 92 Mbps versus zero.
The following table summarizes the parameters the installer generates automatically:
| Parameter | Generated Range | Example Value |
|---|---|---|
Jc (junk packet count) | 4â8 | 6 |
Jmin (min junk size) | 40â89 | 55 |
Jmax (max junk size) | Jmin+100 to Jmin+500 | 380 |
S1 (init padding) | 15â150 | 72 |
S2 (response padding) | 15â150, S1+56â S2 | 56 |
S3 (cookie padding) | 8â55 | 32 |
S4 (data padding) | 4â27 | 16 |
H1 (init header range) | uint32 non-overlapping | 234567-345678 |
H2 (response header range) | uint32 non-overlapping | 3456789-4567890 |
H3 (cookie header range) | uint32 non-overlapping | 56789012-67890123 |
H4 (data header range) | uint32 non-overlapping | 456789012-567890123 |
I1 (CPS packet) | <r N> format | <r 128> |
You don’t need to set any of these manually. The installer generates cryptographically random, constraint-valid values every time.
Now that you know how the obfuscation works, let’s see how AmneziaWG stacks up against the alternatives you might be considering.
AmneziaWG vs Alternatives â Quick Decision Guide

| WireGuard | AmneziaWG 2.0 | OpenVPN+obfs4 | Shadowsocks | VLESS+Reality | |
|---|---|---|---|---|---|
| DPI resistance | Low | High | Medium | Medium | Very High |
| Speed overhead | ~4% | <12% (~3% real-world) | ~25% | ~8% | ~10% |
| Full VPN tunnel | Yes | Yes | Yes | No (proxy) | No (proxy) |
| Runs in kernel | Yes | Yes (DKMS) | No | No | No |
| Setup complexity | Low | Low (with installer) | High | Medium | High |
| Transport | UDP | UDP | TCP/UDP | TCP | TCP |
The decision rules are straightforward:
- No DPI in your country? Use plain WireGuard. It’s simpler and has a larger ecosystem.
- Need maximum DPI resistance and OK with a proxy? VLESS+Reality is the strongest option for obfuscation, but it’s not a full tunnel.
- Want both speed and a full tunnel with obfuscation? AmneziaWG 2.0 is the only option that delivers WireGuard-grade performance with real DPI resistance in a complete VPN tunnel.
- Already using OpenVPN+obfs4 and it still works? No urgent need to switch, but AmneziaWG will be noticeably faster.
This article focuses on AmneziaWG because it’s the only protocol that gives you a full tunnel, kernel-level performance, and built-in obfuscation â all configured by a single script.
If AmneziaWG is the right choice for your situation, here’s exactly what you need before we start deploying.
What You’ll Need Before Starting
Before running the installer, make sure your environment meets these requirements:
| Requirement | Detail | Why |
|---|---|---|
| OS | Ubuntu 24.04 LTS (clean install). Ubuntu 25.10 is experimental. Debian 12/13 work but may needcurl pre-installed. | The installer is tested and fully supported on Ubuntu 24.04. |
| VPS specs | 1 vCore, 1 GB RAM, 25 GB storage. Any $3â5/month plan works. | The installer needs ~2 GB disk and ~1 GB RAM during the DKMS build. The running VPN uses negligible resources. |
| Virtualization | KVM (not OpenVZ, not LXC). | AmneziaWG loads a kernel module via DKMS. LXC shares the host kernel and cannot load custom modules. |
| SSH access | Root or sudo user with password/key authentication. | The installer must run as root. |
| SSH port | Default 22, or pre-opened in UFW if using a non-standard port. | If SSH isn’t on port 22 and you don’t pre-open it, the installer’s firewall setup will lock you out. |
| Client app | Amnezia VPN >= 4.8.12.7 (all platforms). | AWG 2.0 parameters are not understood by older clients. The standard WireGuard client does not support AWG at all. |
â ïž Warning: LXC containers are not supported. If your VPS uses LXC virtualization, the DKMS kernel module build will fail. You must use KVM or bare-metal. Check with your provider if you’re unsure.
â ïž Warning: If your SSH runs on a non-standard port (anything other than 22), you must open it in UFW before running the installer:
sudo ufw allow YOUR_PORT/tcpReplace
YOUR_PORTwith your actual SSH port. The installer enables UFW with a default-deny policy â if your SSH port isn’t allowed, you’ll be locked out immediately.
ð¡ Tip: Wait 5â10 minutes after creating your VPS before running the installer. Cloud-init and background initialization processes can conflict with the
apt-getcalls the installer makes.
With your VPS ready and prerequisites confirmed, let’s deploy AmneziaWG 2.0 using the community installer script â the fastest and most transparent method.
ããŒã¯ãŒã
| ããŒã¯ãŒã | å®çŸ© |
|---|---|
| ð¡ïž AmneziaWG | ãã±ããããããŒããµã€ãºãéä¿¡æéãã©ã³ãã åããŠæ·±å±€ãã±ããæ€æ»ã«å¯Ÿæããªãããåã蚌æãããæå·åãç¶æããWireGuardã®ãã©ãŒã¯ã§ããããã¯ããªãã®ãµãŒããŒäžã§åäœãããããã³ã«ã§ãã |
| ð AmneziaWG 2.0 | åçããããŒç¯å²ïŒåºå®å€ã®ä»£ããã«ïŒã䜿çšããããŒã¿ã¬ãã«ã®ããã£ã³ã°ïŒS4ïŒã远å ãããã匷åãªDPIåé¿ã®ããã«ã«ã¹ã¿ã ãããã³ã«çœ²åãæã€ä»£æ¿ãã±ããããµããŒãããçŸåšã®ã¡ã€ã³ããŒãžã§ã³ã§ãã |
| ð æ·±å±€ãã±ããæ€æ» (DPI) | ISPãæ¿åºæ©é¢ãVPNãã©ãã£ãã¯ãç¹å®ãããããã¯ããããã«ãã±ããããããŒããµã€ãºããã³ãã·ã§ã€ã¯ãã¿ãŒã³ãåæããããã«äœ¿çšãããããã¯ãŒã¯ãã£ã«ã¿ãªã³ã°æè¡ã§ããAmneziaWGã¯ããã«å¯Ÿæããããã«ç¹å¥ã«èšèšãããŠããŸãã |
| â¡ WireGuard | å°ããªã³ãŒãããŒã¹ãšã«ãŒãã«ã¬ãã«ã®ããã©ãŒãã³ã¹ãæã€é«éã§çŸä»£çãªVPNãããã³ã«ã§ããåºå®ãã±ããæ§é ã®ãããDPIã·ã¹ãã ã«ãã£ãŠå®¹æã«èå¥ãããŸãããããã¯AmneziaWGã§å¯ŸåŠãããŠããŸãã |
| ð ã»ã«ããã¹ãVPN | 忥ãããã€ããŒã«å å ¥ããã®ã§ã¯ãªããèªåã®ãµãŒããŒïŒéåžžã¯VPSïŒäžã«å±éã管çããVPNã§ããããŒãæ§æãã€ã³ãã©ã¹ãã©ã¯ãã£ãå¶åŸ¡ããŸãã |
| ð§ DKMS (Dynamic Kernel Module Support) | ã·ã¹ãã ã«ãŒãã«ãæŽæ°ããããšãèªåçã«ã«ãŒãã«ã¢ãžã¥ãŒã«ãåã³ã³ãã€ã«ããLinuxãã¬ãŒã ã¯ãŒã¯ã§ããAmneziaWGã€ã³ã¹ããŒã©ãŒã¯ãDKMSã䜿çšããŠé«æ§èœã®ã«ãŒãã«ã¢ãžã¥ãŒã«ãæ§ç¯ããŸãã |
| ð é£èªå | VPNãã©ãã£ãã¯ãéåžžã®ã€ã³ã¿ãŒããããã©ãã£ãã¯ã®ããã«èŠããããã«é ãè¡çºã§ããAmneziaWGã¯ãããããŒãã©ã³ãã åããããã£ã³ã°ã远å ãã代æ¿ãã±ãããéä¿¡ãããžã£ã³ã¯ãã±ãããçæããããšã§ãã©ã³ã¹ããŒãå±€ã§é£èªåããŸãã |
| ð ã¹ããªãããã³ããªã³ã° | ç¹å®ã®ãã©ãã£ãã¯ïŒäŸïŒãããã¯ããããµã€ãïŒã®ã¿ãVPNãééããä»ã®ãã©ãã£ãã¯ã¯çŽæ¥æ¥ç¶ã䜿çšããã«ãŒãã£ã³ã°æ§æã§ããéšåçãªæ€é²ã®ããåœã§äŸ¿å©ã§ãã |
| ð¥ïž KVM vs LXC | KVMã¯ãAmneziaWGã®ãããªã«ã¹ã¿ã ã«ãŒãã«ã¢ãžã¥ãŒã«ãèªã¿èŸŒãããã«å¿ èŠãªå°çšã«ãŒãã«ãæã€å®å šä»®æ³åã§ããLXCã¯ãã¹ãã®å ±æã«ãŒãã«ã䜿çšããã³ã³ããä»®æ³åã§ãã«ã¹ã¿ã ã¢ãžã¥ãŒã«ãèªã¿èŸŒãããšãã§ããŸããã |
| ðª CPS (Custom Protocol Signature) | AmneziaWG 2.0ã®æ©èœã§ãå®éã®ãã³ãã·ã§ã€ã¯ã®åã«ä»ã®ãããã³ã«ïŒQUICãDNSãSIPïŒãæš¡å£ãã代æ¿ãã±ãããéä¿¡ããDPIã·ã¹ãã ã誀解ãããŠãã©ãã£ãã¯ãéåžžã®ãã®ãšããŠåé¡ããŸãã |
ã»ã«ããããã€åAmneziaWG VPNãµãŒã㌠â å®å šã¬ã€ã

AmneziaWGã¯ãæ¥ç¶ãããããã¯ãŒã¯ãç©æ¥µçã«ãããã¯ããããšããå Žåã«WireGuardã®é床ãã©ã®ããã«éæããããšããç¹å®ã®åé¡ã解決ããããã«èšèšããããããã³ã«ã§ããããã¯Amnezia VPNããŒã ã«ãã£ãŠäœæãããWireGuardã®ãã©ãŒã¯ã§ãããå ã®ãã®ãè¡ããªãããšãè¡ããŸã â ãã©ã³ã¹ããŒãå±€ãã©ã³ãã åããŠæ·±å±€ãã±ããæ€æ»ã·ã¹ãã ããããç¹å®ã§ããªãããã«ããŸããæå·åã¯å šãåããŸãŸã§ãããããã¯ãŒã¯å ã®ãã±ããã®å€èгã ããå€ãããŸãã
VPNã®é£èªåã®åºç¯ãªé¢šæ¯ã¯ãäœå¹Žã«ãããã£ãŠæŠåšç«¶äºã§ãããShadowsocksãVLESS+RealityãOpenVPN with obfs4ã®ãããªããŒã«ã¯ãããŸããŸãªæ¹æ³ã§ãã©ãã£ãã¯ãé ãããšããŸã â äžéšã¯ãããã·ãšããŠãäžéšã¯å®å šãªãã³ãã«ãšããŠãäžéšã¯é«ãããã©ãŒãã³ã¹ã³ã¹ãã䌎ããŸããAmneziaWGã¯ç¹å®ã®ããããå ããŠããŸãïŒããã¯WireGuardã¬ãã«ã®ããã©ãŒãã³ã¹ãšçµã¿èŸŒã¿ã®DPIä¿è·ãæã€å®å šãªVPNãã³ãã«ã§ããããã¹ãŠã1ã€ã®ããã±ãŒãžã«ãŸãšããããŠããŸãããããŠããªãŒãã³ãœãŒã¹ã§ãããããèªåã®ãµãŒããŒã«å±éã§ããŸãã
ãããããããå¿ èŠã«ãªãåé¡ããããŸããWireGuardãèšå®ããŸããããã¯å®ç§ã«æ©èœããŸã â é«éãã¯ãªãŒã³ãä¿¡é Œæ§ããããŸãããããšãããæ¥ãããã忢ããŸãããšã©ãŒã¡ãã»ãŒãžãã¿ã€ã ã¢ãŠããæ¥ç¶æåŠããããŸããããã±ããããã æ¶ããŸãããããå®éã®DPIããããã³ã°ã®å§¿ã§ãïŒãã³ãã«ã¯ãŸã åäœããŠãããæ§æã¯ãŸã æ£ããã®ã«ãäœãééããŸãããããã¯ãã·ã¢ïŒWireGuardã®æåçã¯çŽ12%ïŒãã€ã©ã³ïŒ98%ã®ãã±ããæå€±ïŒãäžåœããšãžãããUAEããã«ã³ããã©ã«ãŒã·ããŠãºããã¹ã¿ã³ãã«ã¶ãã¹ã¿ã³ããã£ã³ããŒãããã¹ã¿ã³ãå«ãå¢ãç¶ããåœã ã®çŸå®ã§ãã

åŸæ¥ã®ä»£æ¿ææ®µã¯ãã®åé¡ãå®å šã«ã¯è§£æ±ºããŸãããShadowsocksã¯ãããã·ã§ãããå®å šãªVPNãã³ãã«ã§ã¯ãããŸãã â DNSãéTCPãã©ãã£ãã¯ã¯ãŸã æŒããŸããOpenVPN with obfs4ã¯æ©èœããŸãããçŽ25%ã®ããã©ãŒãã³ã¹ãªãŒããŒãããããããŸããVLESS+Realityã¯åŒ·åãªé£èªåãæäŸããŸããããããã·ããŒã¹ã§ãããèšå®ãè€éã§ããAmneziaWGã¯ãã®ã®ã£ãããåããŸãïŒããã¯WireGuardã¬ãã«ã®ããã©ãŒãã³ã¹ãšçµã¿èŸŒã¿ã®DPIä¿è·ãæã€å®å šãªVPNãã³ãã«ã§ãã
ãã®ã¬ã€ãã§ã¯ãKVM VPSäžã«å®å šã«æ©èœããAmneziaWG 2.0ãµãŒããŒã15å以å ã«åäžã®ã³ãã¥ããã£ã€ã³ã¹ããŒã©ã¹ã¯ãªããã䜿çšããŠå±éããæ¹æ³ã説æããŸããæçµçã«ã¯ãä»»æã®ããã€ã¹ããæ¥ç¶ã§ããäœæ¥VPNãã³ãã«ãåŸãããŸããæé ã¯ãããã€ããŒã«äŸåãããSSHã¢ã¯ã»ã¹ãšã«ãŒãæš©éãæã€ä»»æã®VPSã§æ©èœããŸããããã¯ãSSHãåºæ¬çãªLinuxã³ãã³ãã䜿ãããªãäžçŽã¬ãã«ã®æè¡ã¹ãã«ãæã€ãŠãŒã¶ãŒåãã«æžãããŠããŸãã
å§ããåã«1ã€ã®æç¢ºåããããŸãïŒAmneziaWGã¯ãããã³ã«ã§ããAmneziaVPNã¯ããã«æ¥ç¶ããã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ã§ãããããã¯é¢é£ããŠããŸããç°ãªããŸã â ããªãã®ãã©ãŠã¶ã®ããã®TLSã®ããã«ãæ¥ç¶ããããã®ã¢ããªã±ãŒã·ã§ã³ãå¿ èŠã§ããããããã³ã«ã¯ããªãã®ãµãŒããŒäžã§åäœããŸãã
ããããäœããå±éããåã«ãAmneziaWGãWireGuardãšç°ãªãçç± â ãããŠãã®éããDPIãããªããèŠãŠãããšãã«éèŠã§ããçç±ãçè§£ããå¿ èŠããããŸãã
AmneziaWGãšã¯äœã§ããïŒ (ã¡ã³ã¿ã«ã¢ãã«)
WireGuardã¯ãã®èšèšã«ãããŠåªé ã§ããå°ããªã³ãŒãããŒã¹ãæã¡ãçŸä»£ã®æå·åã䜿çšããã»ãŒãã€ãã£ãã®ããã©ãŒãã³ã¹ã§Linuxã«ãŒãã«ã§åäœããŸãããããããã®åªé ãã«ã¯å¯èŠæ§ã®åé¡ããããŸãïŒãã¹ãŠã®WireGuardãã±ããã¯åãåºå®ããããŒæ§é ãåãåºå®ãã±ãããµã€ãºãåããã³ãã·ã§ã€ã¯ãã¿ãŒã³ãæã£ãŠããŸããæ·±å±€ãã±ããæ€æ»ã·ã¹ãã ã«ãšã£ãŠãWireGuardãã³ãã«ã¯ããŒã³ãŒãã®ããã«æç¢ºãªçœ²åãæã£ãŠããŸãããã®çœ²åãDPIããã€ã¹ãåŠç¿ãããšãããŒãããããã¯ãããæ¥ç¶ãéãããããããšãªãããã¹ãŠã®ãã±ãããããããã§ããŸãã

ããèããŠã¿ãŠãã ãããWireGuardã¯åžžã«åãå¶æãçãå® é 䟿ã®ããã§ã â é«éã§ä¿¡é Œæ§ãé«ãå¹ççã§ããããããéè·¯ãèŠãŠãã誰ãããã®å¶æãèªèããããã«ãªãããã§ãã¯ãã€ã³ãã§å® é äŸ¿ãæ¢ããããšãã§ããŸããAmneziaWGã¯åãããã±ãŒãžãéã¶åãå® é 䟿ã§ããããã§ãã¯ãã€ã³ãããšã«å¶æãå€ããŸããåã人ãåã貚ç©ãå šãç°ãªãå€èгã§ãã
ããŒãžã§ã³å±¥æŽã¯éèŠã§ããAmneziaWG 1.xã¯WireGuardã®åºå®å€ãšã¯ç°ãªãã«ã¹ã¿ã ããããŒãå°å ¥ããŸãã â ããã¯äžæçã«åœ¹ç«ã¡ãŸããããDPIã·ã¹ãã ã¯é©å¿ããŸããã2025幎æ«ã«ãªãªãŒã¹ãããAmneziaWG 2.0ã¯ããã¹ãŠãã©ã³ãã åããŸãïŒããããŒã¯ãã±ããããšã«å€ãããããã£ã³ã°ã¯ã¡ãã»ãŒãžããšã«ç°ãªãã代æ¿ãã±ããã¯å®éã®ãã³ãã·ã§ã€ã¯ãå§ãŸãåã«ä»ã®ãããã³ã«ãæš¡å£ããŸããæ€åºã®ããã®æ®éçãªçœ²åã¯ååšããŸããããªããªããåAmneziaWG 2.0ãµãŒããŒã¯ç¬èªã®ãã©ã¡ãŒã¿ã»ãããçæããããã§ããåãµãŒããŒã¯ç¬èªã®æ¹èšã話ããŸãã
ãã¹ãŠã®é£èªåãã©ã¡ãŒã¿ããŒãã«èšå®ãããŠãããšãAmneziaWGã¯WireGuardãšåãããã«æ¯ãèããŸã â ãããã³ã«ã¬ãã«ã§å®å šã«åŸæ¹äºææ§ããããŸããããããã¢ã¯ãã£ããªãã©ã¡ãŒã¿ïŒããã©ã«ãèšå®ïŒãæã€ãšãWireGuardãã§ããªããã®ã«ãªããŸãïŒDPIã·ã¹ãã ãç¹å®ããã®ã«èŠåŽããé«éVPNãã³ãã«ã§ãã
ã§ã¯ãAmneziaWGã¯ã©ã®ããã«ãã©ãã£ãã¯ãæå·åããã®ã§ããããïŒDPIãç²ç®ã«ãã4ã€ã®é£èªåã¬ãã«ãèŠãŠã¿ãŸããã â ãããŠãªãããããã»ãšãã©é床ã³ã¹ãã远å ããªãã®ãã説æããŸãã
AmneziaWGãDPIããé ããæ¹æ³ (é床æå€±ãªã)
AmneziaWG 2.0ã¯ãDPIã·ã¹ãã ãVPNãã©ãã£ãã¯ãç¹å®ããããŸããŸãªæ¹æ³ãã¿ãŒã²ããã«ãã4ã€ã®é£èªåã¬ãã«ã䜿çšããŠããŸãããããã¯ãã¹ãŠäžç·ã«æ©èœããŸããåãµãŒããŒã®ãã©ãã£ãã¯ããŠããŒã¯ã«ããŸãã
åçããã㌠(H1âH4)
WireGuardã¯åºå®ã®32ãããã¡ãã»ãŒãžã¿ã€ãèå¥åã䜿çšããŸãïŒ
- 1 â ã€ãã·ãšãŒã·ã§ã³çš
- 2 â ã¬ã¹ãã³ã¹çš
- 3 â ã¯ãããŒä»ãã¬ã¹ãã³ã¹çš
- 4 â ããŒã¿çš
DPIããã€ã¹ã¯ãã©ãã£ãã¯ãã¹ãã£ã³ããéã«ãããã®å€ãæ¢ããŸããAmneziaWG 2.0ã¯ãååºå®å€ãæå®ãããç¯å²ããéžã°ããã©ã³ãã ãªæ°ã«çœ®ãæããŸããã€ãã·ãšãŒã·ã§ã³ããããŒïŒH1ïŒã¯234567ãã345678ã®ä»»æã®å€ã«ãªããŸããã¬ã¹ãã³ã¹ããããŒïŒH2ïŒã¯3456789ãã4567890ã®ç¯å²ã§ãããããã®ç¯å²ã¯éè€ããŸãã â ãããã³ã«ã¯å éšã§ãã±ããã¿ã€ããåºå¥ããå¿ èŠããããŸãããå€éšã®èгå¯è ã«ãšã£ãŠã¯ãæŽãã¹ãåäžã®ããããŒå€ã¯ååšããŸãããåãã±ããã¯åã®ãã®ãšã¯ç°ãªã£ãŠèŠããŸãã
ã©ã³ãã ããã£ã³ã° (S1âS4)
WireGuardã®ã€ãã·ãšãŒã·ã§ã³ãã±ããã¯åžžã«æ£ç¢ºã«148ãã€ãã§ãããã®ã¬ã¹ãã³ã¹ã¯åžžã«æ£ç¢ºã«92ãã€ãã§ãããããã®åºå®ãµã€ãºã¯å¥ã®æçŽã§ããAmneziaWGã¯åãã±ããã¿ã€ãã«ã©ã³ãã ããã£ã³ã°ã远å ããŸãïŒã€ãã·ãšãŒã·ã§ã³ã¯148+S1ãã€ããã¬ã¹ãã³ã¹ã¯92+S2ãã€ããã¯ãããŒä»ãã¬ã¹ãã³ã¹ã¯64+S3ãã€ããåããŒã¿ãã±ããã¯S4ãã€ãã®ããã£ã³ã°ãåãåããŸããS3ãšS4ã¯ããŒãžã§ã³2.0ã§æ°ãããS4ã¯ãã¹ãŠã®ããŒã¿ãã±ããã«åœ±é¿ãäžããæãéèŠãªè¿œå ã§ããããã«ãããã»ãã·ã§ã³ã¬ãã«ã®ãã©ãã£ãã¯åæãã¯ããã«é£ãããªããŸãã
1ã€ã®éèŠãªå¶çŽããããŸãïŒS1+56ã¯S2ãšçãããªãå¿ èŠããããŸããã€ãã·ãšãŒã·ã§ã³ãšã¬ã¹ãã³ã¹ã®å ã®ãµã€ãºå·®ã¯56ãã€ãïŒ148â92ïŒã§ãããããããã£ã³ã°å€ãã¡ããã©ãã®å·®ãã©ã³ãã ã«è£åãããšã2ã€ã®ããã£ã³ã°ããããã±ããã¯åããµã€ãºã«ãªããAmneziaWGãæé€ããããšããŠããæçŽãåçŸããŸããã€ã³ã¹ããŒã©ãŒã®ãã©ã¡ãŒã¿çæåšã¯èªåçã«ãã®å¶çŽã確ä¿ããŸãã
ã«ã¹ã¿ã ãããã³ã«çœ²å (I1âI5)
å®éã®ãã³ãã·ã§ã€ã¯ãå§ãŸãåã«ãAmneziaWGã¯ã©ã€ã¢ã³ãã¯ä»ã®ãããã³ã« â QUICãDNSãSIPããŸãã¯ã«ã¹ã¿ã ãã€ããã¿ãŒã³ãæš¡å£ããæå€§5ã€ã®ä»£æ¿ãã±ãããéä¿¡ããŸãããµãŒããŒã¯ãããã®ãã±ãããå®å šã«ç¡èŠããŸããå®éã®ãã³ãã·ã§ã€ã¯ãåŸ ã€ã ãã§ãã
- ã·ã³ãã«ãªæ§æïŒ128ãã€ãã®ã©ã³ãã ãªãã€ããéä¿¡<r 128>ã
- è€éãªæ§æïŒQUICæ¥ç¶ãéå§ããããã«èŠãããã€ããéä¿¡ïŒ<b 0xc000000001><r 64><t>ïŒãUnixã¿ã€ã ã¹ã¿ã³ãä»ãã
DPIã·ã¹ãã ãã»ãã·ã§ã³éå§ã芳å¯ããŠããå Žåãæåã®ãã±ããã¯éåžžã®Webãã©ãã£ãã¯ã®ããã«èŠããŸãã
ãžã£ã³ã¯ãã±ãã (Jc, Jmin, Jmax)
代æ¿ãã±ããã®åŸãã¯ã©ã€ã¢ã³ãã¯ã«ã¹ã¿ãã€ãºå¯èœãªæ°ã®ãžã£ã³ã¯ãã±ãããéä¿¡ããŸã â JminããJmaxã®ã©ã³ãã ãµã€ãºã®çŽç²ãªãã€ãºã§ãããããã®ãã±ããã¯ã»ãã·ã§ã³éå§ã®ã¿ã€ãã³ã°ãšãµã€ãºãããã¡ã€ã«ããŒãããDPIã·ã¹ãã ãå®éã®ãã³ãã·ã§ã€ã¯ãã©ãããå§ãŸãã®ããç¹å®ããã®ãé£ããããŸãã
é床ã«é¢ãã質å
ã€ã³ã¿ãŒãããäžã§æµéããŠããæ°åããããŸãïŒAmneziaWGã¯65%ã®ãªãŒããŒãããããããŸãããã®æ°åã¯å®éã§ããããŠãŒã¶ãŒã¹ããŒã¹ã®Goå®è£ ãæããŠãããã«ãŒãã«ã¢ãžã¥ãŒã«ã§ã¯ãããŸããããã®ã¬ã€ãã§äœ¿çšãããã³ãã¥ããã£ã€ã³ã¹ããŒã©ãŒã¯DKMSã«ãŒãã«ã¢ãžã¥ãŒã«ãæ§ç¯ããã«ãŒãã«ã¢ãžã¥ãŒã«ã¯å šäœã§12%æªæºã®ãªãŒããŒãããã远å ããŸã â å®éã®ãã¹ãã§ã¯çŽ3%ã§ããæ€é²ãããŠããªããããã¯ãŒã¯ã§ã¯ãWireGuardã§çŽ95 MbpsãAmneziaWG 2.0ã§çŽ92 MbpsãèŠãããŸããæ€é²ããããããã¯ãŒã¯ã§ã¯ãæ¯èŒã¯92 Mbps察ãŒãã§ãã
次ã®è¡šã¯ãã€ã³ã¹ããŒã©ãŒãèªåçã«çæãããã©ã¡ãŒã¿ãèŠçŽãããã®ã§ãïŒ
| ãã©ã¡ãŒã¿ | çæç¯å² | äŸã®å€ |
|---|---|---|
| Jc (ãžã£ã³ã¯ãã±ããã®æ°) | 4â8 | 6 |
| Jmin (æå°ãžã£ã³ã¯ãµã€ãº) | 40â89 | 55 |
| Jmax (æå€§ãžã£ã³ã¯ãµã€ãº) | Jmin+100ããJmin+500 | 380 |
| S1 (ã€ãã·ãšãŒã·ã§ã³ããã£ã³ã°) | 15â150 | 72 |
| S2 (ã¬ã¹ãã³ã¹ããã£ã³ã°) | 15â150, S1+56â S2 | 56 |
| S3 (ã¯ãããŒããã£ã³ã°) | 8â55 | 32 |
| S4 (ããŒã¿ããã£ã³ã°) | 4â27 | 16 |
| H1 (ã€ãã·ãšãŒã·ã§ã³ããããŒç¯å²) | éè€ã®ãªãuint32 | 234567-345678 |
| H2 (ã¬ã¹ãã³ã¹ããããŒç¯å²) | éè€ã®ãªãuint32 | 3456789-4567890 |
| H3 (ã¯ãããŒããããŒç¯å²) | éè€ã®ãªãuint32 | 56789012-67890123 |
| H4 (ããŒã¿ããããŒç¯å²) | éè€ã®ãªãuint32 | 456789012-567890123 |
| I1 (CPSãã±ãã) | <r N>åœ¢åŒ | <r 128> |
ãããã®ãã©ã¡ãŒã¿ãæåã§èšå®ããå¿ èŠã¯ãããŸãããã€ã³ã¹ããŒã©ãŒã¯ãå¶çŽãæºããæå·çã«ã©ã³ãã ãªå€ãæ¯åçæããŸãã
é£èªåãã©ã®ããã«æ©èœããããçè§£ããã®ã§ãAmneziaWGãæ€èšããŠããä»£æ¿ææ®µãšã©ã®ããã«æ¯èŒãããããèŠãŠã¿ãŸãããã
AmneziaWGãšä»£æ¿ææ®µ â ç°¡åãªæææ±ºå®ã¬ã€ã

| WireGuard | AmneziaWG 2.0 | OpenVPN+obfs4 | Shadowsocks | VLESS+Reality | |
|---|---|---|---|---|---|
| DPIèæ§ | äœ | é« | äž | äž | éåžžã«é«ã |
| é床ãªãŒããŒããã | çŽ4% | <12%ïŒå®éã®æ¡ä»¶ã§çŽ3%ïŒ | çŽ25% | çŽ8% | çŽ10% |
| å®å šãªVPNãã³ãã« | ã¯ã | ã¯ã | ã¯ã | ãããïŒãããã·ïŒ | ãããïŒãããã·ïŒ |
| ã«ãŒãã«ã§å®è¡ | ã¯ã | ã¯ãïŒDKMSïŒ | ããã | ããã | ããã |
| ã»ããã¢ããã®è€éã | äœ | äœïŒã€ã³ã¹ããŒã©ãŒäœ¿çšæïŒ | é« | äž | é« |
| ãã©ã³ã¹ããŒã | UDP | UDP | TCP/UDP | TCP | TCP |
æææ±ºå®ã®ã«ãŒã«ã¯ç°¡åã§ãïŒ
- ããªãã®åœã«DPIããªãã§ããïŒ éåžžã®WireGuardã䜿çšããŠãã ãããç°¡åã§ãããåºããšã³ã·ã¹ãã ããããŸãã
- æå€§ã®DPIä¿è·ãå¿ èŠã§ããããã·ãæ°ã«ããªãã§ããïŒ VLESS+Realityã¯é£èªåã«æã匷åãªãªãã·ã§ã³ã§ãããå®å šãªãã³ãã«ã§ã¯ãããŸããã
- é床ãšé£èªåãå Œãåããå®å šãªãã³ãã«ã欲ããã§ããïŒ AmneziaWG 2.0ã¯ãWireGuardã¬ãã«ã®ããã©ãŒãã³ã¹ãæäŸããå®å šãªVPNãã³ãã«å ã§å®éã®DPIä¿è·ãå®çŸããå¯äžã®ãªãã·ã§ã³ã§ãã
- ãã§ã«OpenVPN+obfs4ã䜿çšããŠããŠããŸã æ©èœããŠããŸããïŒ åãæ¿ããç·æ¥ã®å¿ èŠã¯ãããŸããããAmneziaWGã¯æããã«éããªããŸãã
ãã®èšäºã¯AmneziaWGã«çŠç¹ãåœãŠãŠããŸãããªããªããå®å šãªãã³ãã«ãã«ãŒãã«ã¬ãã«ã®ããã©ãŒãã³ã¹ãçµã¿èŸŒã¿ã®é£èªåãæäŸããå¯äžã®ãããã³ã«ã§ããããã¹ãŠãåäžã®ã¹ã¯ãªããã§èšå®ãããããã§ãã
AmneziaWGãããªãã®ç¶æ³ã«é©ããŠããå Žåãå±éãéå§ããåã«å¿ èŠãªãã®ã¯æ¬¡ã®ãšããã§ãã
éå§åã«å¿ èŠãªãã®
ã€ã³ã¹ããŒã©ãŒãå®è¡ããåã«ãç°å¢ããããã®èŠä»¶ãæºãããŠããããšã確èªããŠãã ããïŒ
| èŠä»¶ | 詳现 | çç± |
|---|---|---|
| OS | Ubuntu 24.04 LTSïŒã¯ãªãŒã³ã€ã³ã¹ããŒã«ïŒãUbuntu 25.10ã¯å®éšçã§ããDebian 12/13ã¯åäœããŸãããcurlãäºåã«ã€ã³ã¹ããŒã«ãããŠããå¿ èŠããããŸãã | ã€ã³ã¹ããŒã©ãŒã¯Ubuntu 24.04ã§ãã¹ããããå®å šã«ãµããŒããããŠããŸãã |
| VPS仿§ | 1 vCoreã1 GB RAMã25 GBã¹ãã¬ãŒãžã$3â5/æã®ä»»æã®ãã©ã³ãé©ããŠããŸãã | ã€ã³ã¹ããŒã©ãŒã¯DKMSãã«ãäžã«çŽ2 GBã®ãã£ã¹ã¯ã¹ããŒã¹ãšçŽ1 GBã®RAMãå¿ èŠãšããŸããåäœããVPNã¯æå°éã®ãªãœãŒã¹ã䜿çšããŸãã |
| ä»®æ³å | KVMïŒOpenVZã§ã¯ãªããLXCã§ã¯ãªãïŒã | AmneziaWGã¯DKMSãä»ããŠã«ãŒãã«ã¢ãžã¥ãŒã«ãèªã¿èŸŒã¿ãŸããLXCã¯å ±æãã¹ãã«ãŒãã«ã䜿çšããã«ã¹ã¿ã ã¢ãžã¥ãŒã«ãèªã¿èŸŒãããšãã§ããŸããã |
| SSHã¢ã¯ã»ã¹ | ãã¹ã¯ãŒã/ããŒèªèšŒãæã€ã«ãŒããŸãã¯sudoãŠãŒã¶ãŒã | ã€ã³ã¹ããŒã©ãŒã¯ã«ãŒããšããŠå®è¡ããå¿ èŠããããŸãã |
| SSHããŒã | ããã©ã«ã22ãŸãã¯éæšæºããŒãã䜿çšããŠããå Žåã¯UFWã§äºåã«éæŸãããŠããå¿ èŠããããŸãã | SSHãããŒã22ã§å®è¡ãããŠããªãå Žåãäºåã«éæŸããŠããªããšãã€ã³ã¹ããŒã©ãŒã®ãã¡ã€ã¢ãŠã©ãŒã«èšå®ã«ãã£ãŠãããã¯ãããŸãã |
| ã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ | Amnezia VPN >= 4.8.12.7ïŒãã¹ãŠã®ãã©ãããã©ãŒã ïŒã | AWG 2.0ãªãã·ã§ã³ã¯å€ãã¯ã©ã€ã¢ã³ãã§ã¯çè§£ãããŸãããæšæºã®WireGuardã¯ã©ã€ã¢ã³ãã¯AWGãå šããµããŒãããŠããŸããã |
â ïž èŠåïŒ LXCã³ã³ããã¯ãµããŒããããŠããŸãããããªãã®VPSãLXCä»®æ³åã䜿çšããŠããå ŽåãDKMSã«ãŒãã«ã¢ãžã¥ãŒã«ã®ãã«ãã¯å€±æããŸããKVMãŸãã¯ãã¢ã¡ã¿ã«ã䜿çšããå¿ èŠããããŸãã確信ããªãå Žåã¯ããããã€ããŒã«ç¢ºèªããŠãã ããã
â ïž èŠåïŒ SSHãéæšæºããŒãïŒ22以å€ã®ä»»æã®ããŒãïŒã§å®è¡ãããŠããå Žåãã€ã³ã¹ããŒã©ãŒãå®è¡ããåã«UFWã§ãããå¿ ãéæŸããå¿ èŠããããŸãïŒ
sudo ufw allow YOUR_PORT/tcp
YOUR_PORTãå®éã®SSHããŒãã«çœ®ãæããŠãã ãããã€ã³ã¹ããŒã©ãŒã«ã¯ããã©ã«ãããªã·ãŒã§UFWãå«ãŸããŠããŸã â SSHããŒããèš±å¯ãããŠããªãå Žåãããã«ãããã¯ãããŸãã
ð¡ ãã³ãïŒ VPSãäœæããŠãã5ã10ååŸ ã£ãŠããã€ã³ã¹ããŒã©ãŒãå®è¡ããŠãã ãããCloud-initãããã¯ã°ã©ãŠã³ãåæåããã»ã¹ããã€ã³ã¹ããŒã©ãŒãè¡ãapt-getã®åŒã³åºããšç«¶åããå¯èœæ§ããããŸãã
VPSãæºåã§ããåææ¡ä»¶ã確èªã§ããããã³ãã¥ããã£ã€ã³ã¹ããŒã©ã¹ã¯ãªããã䜿çšããŠAmneziaWG 2.0ãå±éããŸããã â ããã¯æãè¿ éã§éæãªæ¹æ³ã§ãã
æ¹æ³1 â CLIã€ã³ã¹ããŒã©ãŒã§ãããã€ïŒæšå¥šïŒ
ããã¯äž»èŠãªã€ã³ã¹ããŒã«æ¹æ³ã§ããããŒãžã§ã³åºå®ãããã€ã³ã¹ããŒã©ã¹ã¯ãªãããããŠã³ããŒãããã«ãŒããšããŠå®è¡ãã8ã€ã®èªååãããã¹ããããééãïŒ2åã®åèµ·åãäºæ³ãããŸãïŒãå®å šã«æ§æãããAmneziaWG 2.0ãµãŒããŒãåŸãããŸããã€ã³ã¹ããŒã©ãŒã¯ãã¹ãŠãåŠçããŸãïŒããã±ãŒãžã®ã€ã³ã¹ããŒã«ãã«ãŒãã«ã¢ãžã¥ãŒã«ã®ã³ã³ãã€ã«ããã¡ã€ã¢ãŠã©ãŒã«ã®èšå®ããã©ã¡ãŒã¿ã®çæããµãŒãã¹ã®èµ·åã
6.1 â SSHçµç±ã§VPSã«æ¥ç¶
ã¿ãŒããã«ãéãããµãŒããŒã«æ¥ç¶ããŸãïŒ
ssh root@<SERVER_IP>
<SERVER_IP>ãVPSã®å®éã®ãããªãã¯IPã¢ãã¬ã¹ã«çœ®ãæããŸãããããã€ããŒããéã«ãŒããŠãŒã¶ãŒãäžããããå Žåããã®ãŠãŒã¶ãŒã§ãã°ã€ã³ããæ¬¡ã«ææ ŒããŸãïŒ
ssh <username>@<SERVER_IP>
sudo -i
Ubuntu 24.04ã®ãŠã§ã«ã«ã ãããŒã®åŸã«ã«ãŒãããã³ããã衚瀺ãããã¯ãã§ãïŒ
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-xx-generic x86_64)
...
root@vps:~#
6.2 â ã€ã³ã¹ããŒã©ãŒãããŠã³ããŒãããŠå®è¡
ã€ã³ã¹ããŒã©ã¹ã¯ãªãããããŠã³ããŒãããå®è¡å¯èœã«ããå®è¡ããŸãïŒ
wget https://raw.githubusercontent.com/bivlked/amneziawg-installer/v5.8.1/install_amneziawg_en.sh
chmod +x install_amneziawg_en.sh
sudo bash ./install_amneziawg_en.sh
URLã¯v5.8.1ã«ããŒãžã§ã³åºå®ãããŠããŸã â 2026幎4ææç¹ã§ã®ææ°ãªãªãŒã¹ã§ããããã¯ãµãã©ã€ãã§ãŒã³ã®å®å šæ§ã§ãïŒããŠã³ããŒããããã¹ã¯ãªããããã¹ããããããŒãžã§ã³ãšäžèŽããããšãä¿èšŒããŸãããªããžããªãæŽæ°ãããŠãã§ãã
ã€ã³ã¹ããŒã©ãŒã¯æåã«ã·ã¹ãã ããã§ãã¯ããŸãïŒ
============================================
AmneziaWG 2.0 Installer v5.8.1
============================================
Checking system requirements...
OS: Ubuntu 24.04 LTS â OK
Virtualization: KVM â OK
RAM: 1024 MB â OK
Disk: 25 GB free â OK
ãã§ãã¯ã倱æããå Žåãã€ã³ã¹ããŒã©ãŒã¯åæ¢ããçç±ãæããŠãããŸããåé¡ãä¿®æ£ããŠã³ãã³ããåå®è¡ããŠãã ããã
6.3 â ã€ã³ã¹ããŒã©ãŒããã³ãããééãã
ã€ã³ã¹ããŒã©ãŒã¯8ã¹ãããã®ç¶æ æ©æ¢°ã§ãåèµ·ååŸã®åéããµããŒãããŠããŸããé²è¡ç¶æ³ã¯/root/awg/awgsetup_cfg.initã«ä¿åãããããããµãŒããŒãåèµ·åããŠããåãã³ãã³ããåå®è¡ããã ãã§ãéäžããåéã§ããŸãã
ã¹ããã0: åæå â ã€ã³ã¹ããŒã©ãŒã¯OSãä»®æ³åã¿ã€ããRAMããã£ã¹ã¯ã¹ããŒã¹ããã§ãã¯ããŸãã/root/awg/äœæ¥ãã£ã¬ã¯ããªãäœæãã䞊è¡å®è¡ãé²ãããã®ããã¯ãã¡ã€ã«ãèšå®ããŸãã
ã¹ããã1: ã·ã¹ãã ã¢ããããŒãïŒããã±ãŒãžã€ã³ã¹ããŒã« â ã€ã³ã¹ããŒã©ãŒã¯apt-get update && apt-get upgrade -yãå®è¡ããŸãããã®åŸãAmneziaWGãDKMSãLinuxããããŒãUFWãFail2BanãQRã³ãŒãçæããŒã«ããã®ä»ã®äŸåé¢ä¿ãã€ã³ã¹ããŒã«ããŸãã
ð æ³šæïŒ ã€ã³ã¹ããŒã©ãŒã¯ãæå°éã®VPSã€ã³ã¹ã¿ã³ã¹ã§ãªãœãŒã¹ãæ¶è²»ããããã€ãã®ããã¯ã°ã©ãŠã³ããµãŒãã¹ãåé€ããŸãïŒsnapdãmodemmanagerãnetworkd-dispatcherãunattended-upgradesãpackagekitãlxd-agent-loaderãudisks2ãããã¯æå³çã§ãããæå°éã®VPNããŒãã«ã¯å®å šã§ãããäžè¬çãªç°å¢ãå£ãå¯èœæ§ããããŸãã
ã¹ããã1ãå®äºãããšãã€ã³ã¹ããŒã©ãŒã¯åèµ·åãèŠæ±ããŸãïŒ
Reboot required. Reboot now? [y/n]:
yãšå ¥åããŠEnterãæŒããŸãããµãŒããŒãåèµ·åããããå床SSHã§æ¥ç¶ããåãã³ãã³ããåå®è¡ããŸãïŒ
sudo bash ./install_amneziawg_en.sh
ã¹ã¯ãªããã¯ä¿åãããç¶æ ãèªã¿åããå床ããã³ãããæ±ããããšãªãã¹ããã2ã«é²ã¿ãŸãã
ã¹ããã2: DKMSã«ãŒãã«ã¢ãžã¥ãŒã«ãã«ã â ã€ã³ã¹ããŒã©ãŒã¯ãçŸåšã®ã«ãŒãã«ã«å¯ŸããŠAmneziaWGã«ãŒãã«ã¢ãžã¥ãŒã«ãã³ã³ãã€ã«ããå°æ¥ã®ã«ãŒãã«ã¢ããããŒãæã«èªåçã«åæ§ç¯ãããããã«DKMSã«ç»é²ããŸãïŒ
Step 2: Building AmneziaWG kernel module via DKMS...
Creating symlink /var/lib/dkms/amneziawg/2.0/source -> /usr/src/amneziawg-2.0
DKMS: add completed.
Kernel preparation completed.
Building module:
make -C /lib/modules/6.8.0-xx-generic/build M=/var/lib/dkms/amneziawg/2.0/build modules
DKMS: build completed.
DKMS: install completed.
2åç®ã®åèµ·åãèŠæ±ãããŸããyãšå ¥åããŠEnterãæŒããŸãã
ð æ³šæïŒ ã€ã³ã¹ããŒã«äžã«2åã®åèµ·åãããã®ã¯æ£åžžã§äºæ³ãããããšã§ããæåã¯æ°ããã«ãŒãã«ããããŒãèªã¿èŸŒã¿ã2åç®ã¯æ°ããæ§ç¯ãããã«ãŒãã«ã¢ãžã¥ãŒã«ãã¢ã¯ãã£ãã«ããŸããã¹ã¯ãªããã¯åèµ·åéã§ç¶æ ãä¿åããŸã â äœã倱ãããŸããã
2åç®ã®åèµ·ååŸãå床SSHã§æ¥ç¶ããã€ã³ã¹ããŒã©ãŒãããäžåºŠå®è¡ããŸãïŒ
sudo bash ./install_amneziawg_en.sh
ã¹ããã3: åèµ·ååŸã®ã¢ãžã¥ãŒã«ç¢ºèª â ã¹ã¯ãªããã¯ã«ãŒãã«ã¢ãžã¥ãŒã«ãèªã¿èŸŒãŸããŠããããšã確èªããŸãïŒlsmod | grep amneziawgïŒãDKMSãã«ããäœããã®çç±ã§å€±æããå ŽåããŠãŒã¶ãŒã¹ããŒã¹ã®Goå®è£ ã«ãã©ãŒã«ããã¯ããé«ããªãŒããŒãããã«ã€ããŠèŠåããŸãã
ã¹ããã4: ãã¡ã€ã¢ãŠã©ãŒã«èšå® â UFWã¯ããã©ã«ãã®æåŠåä¿¡ããªã·ãŒã§æå¹åãããŸããã€ã³ã¹ããŒã©ãŒã¯ããŒã22ã§ã®SSHã¬ãŒãå¶éã«ãŒã«ã远å ããUDPãã©ãã£ãã¯çšã«VPNããŒããéæŸããawg0ã€ã³ã¿ãŒãã§ãŒã¹ã®ã«ãŒãã£ã³ã°ã«ãŒã«ãèšå®ããŸãã
ã¹ããã5: 管çã¹ã¯ãªããã®ããŠã³ããŒã â ã¯ã©ã€ã¢ã³ã管çã¹ã¯ãªããïŒmanage_amneziawg.shãšawg_common.shïŒã/root/awg/ã«ãªãŒããŒå°çšã®æš©éïŒ700ïŒã§ããŠã³ããŒããããŸããããããv5.8.1ã«ããŒãžã§ã³åºå®ãããŠããŸãã
ã¹ããã6: ã€ã³ã¿ã©ã¯ãã£ãèšå® â ã€ã³ã¹ããŒã©ãŒã¯ä»ã4ã€ã®è³ªåãããŸãïŒ
- UDPããŒãïŒããã©ã«ãïŒ39743ãç¯å²1024â65535ïŒãããã©ã«ãã¯ã©ã³ãã ãªé«ããŒãã§ã â ISPãé«ãUDPããŒãããããã¯ããããšã§ç¥ãããŠããªãéãããã®ãŸãŸã«ããŠãã ããã
- ãã³ãã«ãµããããïŒããã©ã«ãïŒ10.9.9.1/24ïŒãããã¯å éšVPNãããã¯ãŒã¯ã§ãããµãŒããŒã¯.1ãååŸããã¯ã©ã€ã¢ã³ãã¯.2ãã.254ãååŸããæå€§253ã¯ã©ã€ã¢ã³ãããµããŒãããŸãã
- IPv6ãç¡å¹ã«ããïŒããã©ã«ãïŒYïŒãæšå¥š â IPv6ãç¡å¹ã«ããããšã§ãIPv6ã«ãŒãã§ãã³ãã«ã®å€ã«ãã©ãã£ãã¯ãæŒããã®ãé²ããŸãã
- ã«ãŒãã£ã³ã°ã¢ãŒãïŒ1ãéžæããŠãã¹ãŠã®ãã©ãã£ãã¯ã2ãéžæããŠAmneziaãªã¹ã + DNSïŒæšå¥šïŒããŸãã¯3ãéžæããŠã«ã¹ã¿ã ãããã¯ãŒã¯ãéžæããŸããã¢ãŒã2ã¯ããããã¯ãããå ¬çIPç¯å²ãšDNSã®ã¿ãVPNçµç±ã§ã«ãŒãã£ã³ã°ããããŒã«ã«ãããã¯ãŒã¯ã¢ã¯ã»ã¹ãè¿ éãã€çŽæ¥ã«ä¿ã¡ãŸãã
ð¡ ãã³ãïŒ MTUã¯ããã©ã«ãã§1280ã«èšå®ãããŠããŸããããã¯æå°ã®IPv6 MTUã§ãããã¢ãã€ã«ããã³ã»ã«ã©ãŒãããã¯ãŒã¯ã«ãšã£ãŠéèŠã§ããiOSã¯ãã¹MTUçºèŠã«å³æ Œã§ãããã»ã«ã©ãŒãããã¯ãŒã¯ã¯ãã°ãã°WireGuardã®ããã©ã«ãã®1420æªæºã®å¹æçãªMTUãæã£ãŠããŸããããã1280ã®ãŸãŸã«ããŠãã ããã
ã¹ããã7: ãµãŒãã¹éå§ â ã€ã³ã¹ããŒã©ãŒã¯/etc/amnezia/amneziawg/awg0.confã«ãµãŒããŒèšå®ãçæãã/root/awg/ã«2ã€ã®ããã©ã«ãã¯ã©ã€ã¢ã³ãèšå®ïŒmy_phoneãšmy_laptopïŒãäœæããQRã³ãŒããçæããawg-quick@awg0ã®systemdãµãŒãã¹ãéå§ããŸãã
ã¹ããã8: å®äº â æåã¡ãã»ãŒãžã衚瀺ãããŸãïŒ

ã€ã³ã¹ããŒã©ãŒã¯ãã¹ãŠã®AmneziaWG 2.0é£èªåãã©ã¡ãŒã¿ãèªåçã«çæããŸãããããã«è§Šããå¿ èŠã¯ãããŸãããåãµãŒããŒã«ã¯ãŠããŒã¯ãªå€ã®ã»ãããäžããããŸã â DPIã·ã¹ãã ãæ€åºããããã®æ®éçãªæçŽã¯ãããŸããã
6.4 â ã€ã³ã¹ããŒã«åŸã®ã¯ã©ã€ã¢ã³ã管ç
/root/awg/manage_amneziawg.shã®ç®¡çã¹ã¯ãªããã¯ããã¹ãŠã®ã¯ã©ã€ã¢ã³ãã©ã€ããµã€ã¯ã«æäœãåŠçããŸãã以äžã¯éèŠãªã³ãã³ãã§ãïŒ
æ°ããã¯ã©ã€ã¢ã³ãã远å ïŒ
sudo bash /root/awg/manage_amneziawg.sh add my_desktop
ããã«ãããæ°ããã¯ã©ã€ã¢ã³ãã®.confãã¡ã€ã«ãQRã³ãŒããããã³.vpnuriãã¡ã€ã«ãçæãããŸãããµãŒããŒèšå®ã¯ããããªããŒããããŸã â ãµãŒãã¹ã®åèµ·åã¯å¿ èŠãããŸããã
äžæçãªèªåæéåãã¯ã©ã€ã¢ã³ãã远å ïŒ
sudo bash /root/awg/manage_amneziawg.sh add guest --expires=7d
cronãžã§ãã5åããšã«ãã§ãã¯ããæéãåãããšèªåçã«ã¯ã©ã€ã¢ã³ããåé€ããŸããèšå®ãããŒãããã³ãµãŒããŒãšã³ããªã¯ãã¹ãŠã¯ãªãŒã³ã¢ãããããŸãã
ãã¹ãŠã®ã¯ã©ã€ã¢ã³ãããªã¹ãïŒ
sudo bash /root/awg/manage_amneziawg.sh list
Clients: my_phone (10.9.9.2/32) my_laptop (10.9.9.3/32) my_desktop (10.9.9.4/32) guest (10.9.9.5/32) [expires in 6d 23h]
远å ã®è©³çްïŒå ¬ééµãäœææ¥ãå«ãïŒã«ã¯-vãã©ã°ã远å ããŸãã
ã¯ã©ã€ã¢ã³ããåé€ïŒ
sudo bash /root/awg/manage_amneziawg.sh remove guest
ãµãŒããŒã®å®å šãªç¶æ ã確èªïŒ
sudo bash /root/awg/manage_amneziawg.sh check
ããã«ããããµãŒãã¹ã®ç¶æ ãéããŠããããŒãããã¹ãŠã®AWG 2.0ãã©ã¡ãŒã¿ãã«ãŒãã«ã¢ãžã¥ãŒã«ã®ç¶æ ãUFWã®ç¶æ ãFail2Banã®ç¶æ ã1ã€ã®ãã¥ãŒã§è¡šç€ºãããŸãã
ã¯ã©ã€ã¢ã³ãããšã®ãã©ãã£ãã¯çµ±èšã衚瀺ïŒ
sudo bash /root/awg/manage_amneziawg.sh stats
Client Received Sent Latest handshake âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ my_phone 1.24 GiB 356.7 MiB 2 minutes ago my_laptop 892.3 MiB 128.4 MiB 15 seconds ago my_desktop 0 B 0 B (none)
ããã¯ã¢ãããäœæïŒ
sudo bash /root/awg/manage_amneziawg.sh backup
ããã«ããããµãŒããŒèšå®ãã¯ã©ã€ã¢ã³ãèšå®ãããŒãããã³æå¹æéããŒã¿ãå«ãå§çž®ã¢ãŒã«ã€ãã/root/awg/backups/ã«äœæãããŸãã
ð æ³šæïŒ addããã³removeã³ãã³ãã¯ãããããªããŒãã®ããã«awg syncconfã䜿çšããŸãããµãŒããŒèšå®ã¯ãµãŒãã¹ãåèµ·åããããšãªãå³åº§ã«æŽæ°ãããŸããããŒããMTUãªã©ã®ãµãŒããŒåŽã®ãã©ã¡ãŒã¿ã倿Žããå Žåã«ã®ã¿restartã䜿çšããŠãã ããã
6.5 â ãµãŒããŒã皌åããŠããããšã確èª
ãã¹ãŠã皌åããŠããããšã確èªããããã«ã以äžã®ãã§ãã¯ãå®è¡ããŸãïŒ
systemdãµãŒãã¹ã確èªïŒ
sudo systemctl status awg-quick@awg0
â awg-quick@awg0.service - AmneziaWG Quick via awg-quick(8) for awg0
Loaded: loaded (/lib/systemd/system/awg-quick@.service; enabled)
Active: active (exited) since Thu 2026-04-09 14:32:01 UTCAmneziaWGã®ç¶æ ãšãã©ã¡ãŒã¿ã確èªïŒ
sudo awg show awg0
ãã¡ã€ã¢ãŠã©ãŒã«ã確èªïŒ
sudo ufw status verbose
Status: active Default: deny (incoming), allow (outgoing) 22/tcp LIMIT IN Anywhere 39743/udp ALLOW IN Anywhere
Fail2Banã確èªïŒ
sudo fail2ban-client status sshd
Status for the jail: sshd |- Filter | |- Currently failed: 0 | `- Total failed: 0 `- Actions |- Currently banned: 0 `- Banned IP list:
DKMSã«ãŒãã«ã¢ãžã¥ãŒã«ã確èªïŒ
dkms status
amneziawg/1.0.0, 6.8.0-110-generic, x86_64: installed
ãã¹ãŠã®5ã€ã®ãã§ãã¯ãåæ Œããã°ãããªãã®AmneziaWG 2.0ãµãŒããŒã¯çšŒåããŠãããæ¥ç¶ãåãå ¥ããæºåãæŽã£ãŠããŸãã
ãµãŒããŒã¯çšŒåããŠããã確èªãããŸãããã¿ãŒããã«ã®ä»£ããã«GUIé§åã®ã¢ãããŒãã奜ãå Žåã¯ãAmneziaVPNã¢ããªã䜿çšããä»£æ¿æ¹æ³ããããŸãã
æ¹æ³2 â AmneziaVPNã¢ããªã§ãããã€ïŒä»£æ¿ïŒ
AmneziaVPNãã¹ã¯ãããã¢ããªã±ãŒã·ã§ã³ã¯ãSSHçµç±ã§ãµãŒããŒã«AmneziaWGãèªåã€ã³ã¹ããŒã«ã§ããŸããCLIã¡ãœãããšåãåºç€ãšãªãã€ã³ã¹ããŒã©ã¹ã¯ãªããã䜿çšããŸããããã¹ãŠãã¬ã€ãä»ãã€ã³ã¿ãŒãã§ãŒã¹ã«ã©ããããŸããããã¯ãæéã®ããããªãã€ã³ã¹ããŒã«äœéšãæ±ããå Žåã«æé©ã§ãã
- AmneziaVPNãããŠã³ããŒã amnezia.org/en/downloadsãããWindowsãmacOSãLinuxãAndroidãiOSçšã«å©çšå¯èœã§ãã
- ã¢ããªãéããšâïŒãã©ã¹ã¢ã€ã³ã³ïŒãŸãã¯å§ãããã¯ãªãã¯ããŸãã
- æç€ºããããªãã·ã§ã³ãããã»ã«ããã¹ãVPNããéžæããŸãã
- ãµãŒããŒã®èªèšŒæ
å ±ãå
¥åïŒ
- ãµãŒããŒIPã¢ãã¬ã¹ïŒSSHã22ã§ãªãå Žåã¯ããŒãããäŸïŒ203.0.113.10:2221ïŒ
- SSHãŠãŒã¶ãŒåïŒäŸïŒrootïŒ
- ãã¹ã¯ãŒããŸãã¯SSHãã©ã€ããŒãããŒ
- ã€ã³ã¹ããŒã«ã¿ã€ããéžæïŒ
- èªå â AmneziaWGã®ã¿ãã€ã³ã¹ããŒã«ïŒæšå¥šïŒ
- æå â ãªã¹ãããç¹å®ã®ãããã³ã«ãéžæ
- ãã€ã³ã¹ããŒã«ããã¯ãªã㯠â ã¢ããªãSSHçµç±ã§ãµãŒããŒã«æ¥ç¶ããèªåçã«ã€ã³ã¹ããŒã«ãå®è¡ããŸããé²è¡ç¶æ³ã€ã³ãžã±ãŒã¿ãŒã衚瀺ãããŸãã
- ã€ã³ã¹ããŒã«åŸãã¢ããªã䜿çšå¯èœãªVPNæ¥ç¶ãããã¡ã€ã«ãäœæããŸãã
ã€ã³ã¹ããŒã«åŸã®æ³šæïŒ
- ã¢ããªã¯ããã©ã«ãã§ã©ã³ãã ãªããŒãã§AmneziaWGãã€ã³ã¹ããŒã«ããŸããäžéšã®ISPã¯é«ããŒãã§ã®UDPããããã¯ããŸããã¢ããªã¯9999æªæºã®ããŒãïŒ585ã1234ãªã©ïŒãžã®å€æŽãæšå¥šããŸãã倿Žããã«ã¯ïŒæ¥ç¶ã®é£ã«ããæ¯è»ã¢ã€ã³ã³ãã¯ãªã㯠â 管çã¿ã â ããŒãçªå·ã倿ŽããŸãã
- ãµãŒããŒã«ãã§ã«AmneziaãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ãããŠããå Žåãæ¥ç¶äœæäžã«ãèšå®ãã¹ãããããã¯ãªãã¯ãããã®åŸç®¡çã¿ãã§ã以åã«ã€ã³ã¹ããŒã«ãããAmneziaãµãŒãã¹ããµãŒããŒã§ç¢ºèªãã䜿çšããŸãã
以äžã¯ã2ã€ã®æ¹æ³ã®æ¯èŒã§ãïŒ
| åŽé¢ | CLIã€ã³ã¹ããŒã©ãŒ | AmneziaVPNã¢ã㪠|
|---|---|---|
| å¶åŸ¡ | å®å š â ãã¹ãŠã®ã¹ããããèŠããã«ã¹ã¿ãã€ãºå¯èœ | å¶éããã â ã¢ããªããã¹ãŠãåŠç |
| å¯èŠæ§ | éæ â ãã¹ãŠã®ã³ãã³ãã衚瀺ããã | äžéæ â èåŸã§å®è¡ããã |
| æè»æ§ | ã«ã¹ã¿ã ã«ãŒãã£ã³ã°ããšã³ããã€ã³ãããã©ã° | ããã©ã«ãã®ã¿ãäœ¿çš |
| 䜿ãããã | SSHã®ç¥èãå¿ èŠ | ã¿ãŒããã«äœæ¥ãŒã |
| 管ç | å®å šmanage_amneziawg.shã¹ã€ãŒã | ã¢ããªããŒã¹ã®ç®¡çã®ã¿ |
| æé© | 管çãããŠããªãVPSããã©ãã«ã·ã¥ãŒãã£ã³ã° | è¿ éãªã»ããã¢ãããã¬ã€ãä»ãäœéš |
CLIãŸãã¯ã¢ããªã䜿çšããå ŽåããµãŒããŒã¯æºåãæŽããŸãããæ¬¡ã«ãæåã®ããã€ã¹ãæ¥ç¶ããŸãããã
æåã®ã¯ã©ã€ã¢ã³ããæ¥ç¶ãã
ã€ã³ã¹ããŒã«åŸãAmnezia VPNã¢ããªã«ã¯ã©ã€ã¢ã³ãèšå®ãã€ã³ããŒãããæ¹æ³ã¯3ã€ãããŸããããã€ã¹ã«åã£ãæ¹æ³ãéžæããŠãã ããã
æ¹æ³A: QRã³ãŒãïŒã¢ãã€ã«ïŒ
ã€ã³ã¹ããŒã©ãŒã¯/root/awg/my_phone.pngã«QRã³ãŒããçæããŸããããããã³ã³ãã¥ãŒã¿ã«ããŠã³ããŒãããŸãïŒ
scp root@<SERVER_IP>:/root/awg/my_phone.png .
PNGãã¡ã€ã«ãç»é¢ã«è¡šç€ºããŸããæºåž¯é»è©±ã§Amnezia VPNã¢ããªãéãããVPNã远å ã â ãQRã³ãŒããã¹ãã£ã³ããã¿ããããã«ã¡ã©ãç»é¢ã®QRã³ãŒãã«åããŸããæ¥ç¶ãèªåçã«ã€ã³ããŒããããŸãã
æ¹æ³B: vpn:// URIïŒAmneziaã¯ã©ã€ã¢ã³ãïŒ
ãµãŒããŒã§å§çž®ãããURIã衚瀺ããŸãïŒ
cat /root/awg/my_phone.vpnuri
å šäœã®vpn://…æååãã³ããŒããèªåã«éä¿¡ããŸã â Telegramãã¡ãŒã«ããŸãã¯ã¡ã¢ã¢ããªãä»ããŠãæºåž¯é»è©±ã§Amnezia VPNã¢ããªãéãããVPNã远å ã â ãã¯ãªããããŒããã貌ãä»ãããã¿ããããŸããèšå®ã1ã¹ãããã§ã€ã³ããŒããããŸãã
URIã¯ããã«èšå®ãã¡ã€ã«ã®zlibå§çž®ãBase64ãšã³ã³ãŒãããŒãžã§ã³ã§ããã³ã³ãã¯ãã§è¿ éãªå ±æã®ããã«èšèšãããŠããŸãã
æ¹æ³C: .confãã¡ã€ã«ïŒãã¹ã¯ããã/WindowsïŒ
èšå®ãã¡ã€ã«ãããŠã³ããŒãããŸãïŒ
scp root@<SERVER_IP>:/root/awg/my_phone.conf .
AmneziaWG for Windowsã¯ã©ã€ã¢ã³ããŸãã¯AmneziaVPNãã¹ã¯ãããã¢ããªãéããããã¡ã€ã«ãããã³ãã«ãã€ã³ããŒãããã¯ãªãã¯ãã.confãã¡ã€ã«ãéžæããŸãã
æ¥ç¶ã確èª
æ¥ç¶åŸããã³ãã«ããµãŒããŒãéããŠãã©ãã£ãã¯ãã«ãŒãã£ã³ã°ããŠããããšã確èªããŸãïŒ
curl ifconfig.me
åºåã«ã¯ãããŒã«ã«ã§ã¯ãªããµãŒããŒã®ãããªãã¯IPã¢ãã¬ã¹ã衚瀺ãããã¯ãã§ãïŒ203.0.113.1
詳现ã確èªããã«ã¯ããµãŒããŒã®å°ççäœçœ®ãå«ããŠïŒ
curl -s https://ipinfo.io/json
{
"ip": "203.0.113.1",
"city": "Amsterdam",
"region": "North Holland",
"country": "NL",
...
}â ïž èŠåïŒ æšæºã®WireGuardã¯ã©ã€ã¢ã³ãã¯AmneziaWG 2.0èšå®ã§ã¯åäœããŸãããAmnezia VPNã¢ããªïŒããŒãžã§ã³4.8.12.7以éïŒãŸãã¯ãã€ãã£ãã®AmneziaWGã¯ã©ã€ã¢ã³ãïŒWindows/Android/iOSã§ããŒãžã§ã³2.0.0以éïŒã䜿çšããå¿ èŠããããŸãã
â ïž èŠåïŒ Windowsã§ãç¡å¹ãªããŒïŒs3ãã衚瀺ãããå ŽåãAmneziaWG Windowsã¯ã©ã€ã¢ã³ããå€ãïŒããŒãžã§ã³2.0.0æªæºïŒã§ããããŒãžã§ã³2.0.0+ã«æŽæ°ããããAmnezia VPNã¢ããªã«åãæ¿ããŠãã ããã
ð¡ ãã³ãïŒ æ¥ç¶ãããŠãããã€ã³ã¿ãŒãããããªãå Žåãã¯ã©ã€ã¢ã³ãèšå®ã«MTU = 1280ã[Interface]ã»ã¯ã·ã§ã³ã«å«ãŸããŠããããšã確èªããŠãã ãããããã¯ãã¢ãã€ã«ãããã¯ãŒã¯ã§ããã³ãã·ã§ã€ã¯ãæåããããã©ãã£ãã¯ããªããã®æãäžè¬çãªåå ã§ãã
ããã§ãšãããããŸãïŒããªãã®VPNãã³ãã«ã¯æ©èœããŠããŸãã
次ã«äœãããã â ã»ããã¢ãããæ¡åŒµãã
ããªãã¯ä»ãDPIèæ§ã®ããVPNãã³ãã«ãèªåã®ãµãŒããŒäžã§çšŒåãããŠãããããªãã®å¶åŸ¡äžã«ãããŸããWireGuardã¬ãã«ã®é床ã§ãããªãã®WireGuardæ¥ç¶ã殺ããéããªãã±ããæ»äº¡ã¯ãã¯ãåé¡ã§ã¯ãããŸãã â ããªãã®ãã©ãã£ãã¯ã¯DPIã·ã¹ãã ãä¿¡é Œæ§ãæã£ãŠç¹å®ã§ãããã®ãšã¯äœãèŠããŸããã
次ã«ã§ããæã䟿å©ãªããšã¯ä»¥äžã®éãã§ãïŒ
- å®¶æãããŒã ã®ããã«ã¯ã©ã€ã¢ã³ãã远å â 管çã¹ã¯ãªããã䜿çšããŠãã¢ã¯ã»ã¹ãå¿ èŠãªãã¹ãŠã®ããã€ã¹ã®èšå®ãçæããŸãã
- ãã«ãã³ãã«ã«ãŒãã£ã³ã°ãå¿ èŠãªãå Žåã¯ã¹ããªãããã³ããªã³ã°ãèšå® â ããã«ããããŒã«ã«ãã©ãã£ãã¯ãè¿ éã«ãªããVPSã®åž¯åå¹ ãåæžãããŸãã
- èšå®ãããã¯ã¢ãã â ããã¯ã¢ããã³ãã³ããå®è¡ããå®å šãªå Žæã«ã¢ãŒã«ã€ããä¿åããŸãããµãŒããŒãåæ§ç¯ããå¿ èŠãããå ŽåããããããªãããŒãããå§ããããšããæããŸãã
ãã«ãã³ãã«ãéããŠãã¹ãŠã®ãã©ãã£ãã¯ãã«ãŒãã£ã³ã°ããå¿ èŠããªãå Žåã¯ã¹ããªãããã³ããªã³ã°ãèšå®ããŸããããã¯ç¹ã«éšåçãªæ€é²ã®ããåœã§äŸ¿å©ã§ã â ãããã¯ããããµã€ãã®ã¿ããã³ãã«çµç±ã§ã«ãŒãã£ã³ã°ããããŒã«ã«ãã©ãã£ãã¯ãçŽæ¥ä¿ã¡ãŸãïŒ
sudo bash /root/awg/manage_amneziawg.sh modify my_phone AllowedIPs "192.168.1.0/24,10.0.0.0/8"
ç°ãªããªãŸã«ããŒã奜ãå Žåã¯ã¯ã©ã€ã¢ã³ãDNSã倿ŽïŒ
sudo bash /root/awg/manage_amneziawg.sh modify my_phone DNS "8.8.8.8,1.0.0.1"
æ»æçãªNATèšå®ã䜿çšããŠããå Žåã¯PersistentKeepaliveã調æŽããŸããããã©ã«ãã®33ç§ã¯ãNATãéããŠUDPã»ãã·ã§ã³ãç¶æããŸã â 25ã«äžããããšã§ãã¢ã€ãã«UDPã»ãã·ã§ã³ãããã«ãããããããããã¯ãŒã¯ã§å©ãã«ãªãããšããããŸãïŒ
sudo bash /root/awg/manage_amneziawg.sh modify my_phone PersistentKeepalive 25
ã«ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ããŠãããã¯ãŒã¯å šäœãã«ããŒããŸããAmneziaWGã¯ãAWG Managerãä»ããŠKeeneticã«ãŒã¿ãŒã§ãMerlinçšã®AmneziaWGãä»ããŠASUSã«ãŒã¿ãŒã§ãµããŒããããŠããŸãã
èšå®ãä»ããããã¯ã¢ããããŸããäœããå€ããåã«ïŒ
sudo bash /root/awg/manage_amneziawg.sh backup
æ°ãããµãŒããŒã«ç§»è¡ããå¿ èŠãããå Žåãã¯ãªãŒã³ã€ã³ã¹ããŒã«ãå®è¡ãããã®åŸïŒ
sudo bash /root/awg/manage_amneziawg.sh restore
sudo bash /root/awg/manage_amneziawg.sh regen
restoreã³ãã³ãã¯èšå®ãšããŒã埩å ããregenã¯æ°ãããµãŒããŒIPã§ã¯ã©ã€ã¢ã³ãèšå®ãæŽæ°ããŸãã
ãã詳现ãªããã¥ã¡ã³ãã«ã€ããŠã¯ãå ¬åŒã®Amneziaããã¥ã¡ã³ãã¯docs.amnezia.orgã«ãããã³ãã¥ããã£ã¯Telegramã§æŽ»çºã§ãã
çµè«
å®å šãªã»ããã¢ãããçµãŠãAmneziaWG 2.0ã®éç«ã£ãç¹ã¯ãåã«æ©èœããã ãã§ãªããä»ã®ãã®ã倱æãããšããã§ãªãä¿¡é Œæ§ãããã®ããšããããšã§ããWireGuardã®èšŒæãããæå·ã³ã¢ãä¿æããªããããã©ãã£ãã¯ããããã¯ãŒã¯äžã§ã©ã®ããã«èŠããããæ ¹æ¬çã«å€ããããšã§ã深局ãã±ããæ€æ»ãå©çšããæ£ç¢ºãªåŒ±ç¹ãåé¿ããŸãããã®çµæãå®éã«ã¯WireGuardãšåãããã«é«éã§ã·ã³ãã«ã«æããããã»ããã¢ãããåŸãããŸãããæµå¯Ÿçãªç°å¢ã§ã¯ã¯ããã«èæ§ããããŸããå±éããããšããã®äŸ¡å€ã¯æããã«ãªããŸãïŒããªãã¯åã«VPNãéå¶ããŠããã®ã§ã¯ãªããå®éã®ããããã³ã°ã«èããããã«æ§ç¯ãããVPNãéå¶ããŠããŸãã
AmneziaWGãµãŒããŒããã¹ãããããã®ä¿¡é Œã§ããVPSãæ¢ããŠããå ŽåããŸãã¯ããŒã ã¡ã³ããŒã®ããã«è¿œå ã®ãšã³ããã€ã³ããã¹ã±ãŒã«ã¢ããããå¿ èŠãããå Žåã¯ãAvaHostãæäŸããKVMä»®æ³åãå®å šãªã«ãŒãã¢ã¯ã»ã¹ãNVMeã¹ãã¬ãŒãžãããã³ãã®ã»ããã¢ããã«å¿ èŠãªUbuntu 24.04ãµããŒãããããŸãã圌ãã®ã€ã³ãã©ã¹ãã©ã¯ãã£ã¯ããã®ã¬ã€ããã«ããŒããèªå·±ãã¹ãåå±éã®ããã«ç¹å¥ã«æ§ç¯ãããŠããŸãã