I have an EC2 instance with Ubuntu 22.04. I am trying to create a tunnel between the EC2 instance to my PC. On my PC I have a VirtualBox VM with Ubuntu 22.04 as well (Bridged Network) The EC2 instance acts as the server that exposes its IP.
This is the wg0.conf on the EC2 instance:
[Interface]
Address = 10.8.0.11/24
Address = fc1d:86gb:c3bc::1/64
SaveConfig = true
ListenPort = 51820
PrivateKey = <ec2_private_key>
[Peer]
PublicKey = <my_local_pc_public_key>
AllowedIPs = 10.8.0.22/32, fd0d:86gb:c3bc::2/128
This is the wg0.conf on my local PC VM:
[Interface]
PrivateKey = <my_local_pc_private_key>
Address = 10.8.0.22/24
Address = fc1d:86gb:c3bc::2/64
[Peer]
PublicKey = <ec2_public_key>
AllowedIPs = 10.8.0.0/24, fc1d:86gb:c3bc::/64
Endpoint = <ec2_public_IPv4_address>
In my EC2 inbound rules I allowed UDP port 51820
from all IPv4 and IPv6 addresses.
On the server I started the wg service. Although it doesn't show active(running)
, it shows active(exited)
:
ubuntu@ip:~$ sudo systemctl status [email protected]
● [email protected] - WireGuard via wg-quick(8) for wg0
Loaded: loaded (/lib/systemd/system/[email protected]; enabled; vendor pre>
Active: active (exited) since Mon 2022-11-07 05:17:24 UTC; 10h ago
Then I type on my local pc the wg-quick command: sudo wg-quick up wg0 But I don't see handshake between the two machines How can I further debug it?