Skip to content

Instantly share code, notes, and snippets.

@nesty92
Last active November 17, 2020 02:40
Show Gist options
  • Save nesty92/2f54e24230d6f67466fb1531531c6dee to your computer and use it in GitHub Desktop.
Save nesty92/2f54e24230d6f67466fb1531531c6dee to your computer and use it in GitHub Desktop.
Wireguard over udp2raw

Server

udp2raw_amd64 -s -l0.0.0.0:24447 -r 127.0.0.1:51820  --raw-mode udp -k "SOME_RANDOM_KEY" -a

Client

udp2raw_amd64 -c -l127.0.0.1:24448  -rPUBLIC_IP:24447 --raw-mode udp -k "SAME_PREVIOUS_RANDOM_KEY" -a

Wireguard Config Example:

[Interface]
Address = PRIVATE_IP
PrivateKey = PrivateKey
DNS = 1.1.1.1,8.8.8.8
ListenPort = 24447
MTU = 1300
PostUp = ip route add PRIVATE_RANGE dev wg0 && ip route add PUBLIC_IP/32 via $(ip route | awk '$1=="default" {print $3}') 
PostDown = ip route del PRIVATE_RANGE

[Peer]
PublicKey = PublicKey
Endpoint = 127.0.0.1:24448
AllowedIPs = 0.0.0.0/0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment