$5 の VPS に WireGuard VPN
NoctisNode VPS へ設定ファイル 1 つで WireGuard 構築:堅牢なデフォルト、IPv6 対応、ピア追加は数秒。コピペで OK。
WireGuard なら数分で NoctisNode のクリーン IP 上にプライベート出口が手に入ります。以下は Ubuntu 24.04 か Debian 12 を想定——どちらも注文フローでワンクリック選択可能。
インストールと有効化
apt update && apt install -y wireguard
systemctl enable wg-quick@wg0サーバー設定
鍵生成は wg genkey | tee server.key | wg pubkey。フォワーディングは PostUp に頼らず /etc/sysctl.conf で恒久有効化するのがおすすめ。
[Interface]
Address = 10.66.0.1/24, fd42::1/64
ListenPort = 51820
PrivateKey = <server-private-key>
PostUp = sysctl -w net.ipv4.ip_forward=1; ip6tables -t nat -A POSTROUTING -s fd42::/64 -o eth0 -j MASQUERADE; iptables -t nat -A POSTROUTING -s 10.66.0.0/24 -o eth0 -j MASQUERADE
PostDown = sysctl -w net.ipv4.ip_forward=0ピア追加
各ピアに IPv4 は /32、IPv6 は /128 を割り当て。systemctl restart wg-quick@wg0 で再起動し、クライアント側は AllowedIPs = 0.0.0.0/0, ::/0 で全トラフィックを VPS 経由に。
[Peer]
PublicKey = <client-public-key>
AllowedIPs = 10.66.0.2/32, fd42::2/128デフォルトの堅牢化
- ▹ファイアウォールは 51820/udp と SSH のみ開放;SSH は鍵専用のまま。
- ▹端末の手元を離れたらピア鍵をローテーション——ピアブロック削除は即時。
- ▹IPv6 は全プランに含まれる。IPv4 だけをトンネルせず活用を。