Skip to content

Instantly share code, notes, and snippets.

@maple3142
Created March 14, 2024 04:47
Show Gist options
  • Save maple3142/4b49e6f0aeef66d393ab6b169dc83517 to your computer and use it in GitHub Desktop.
Save maple3142/4b49e6f0aeef66d393ab6b169dc83517 to your computer and use it in GitHub Desktop.
Cloudflare warp example config that works in WSL2
[Interface]
PrivateKey = REDACTED
Address = 172.16.0.2/32
MTU = 1280
[Peer]
PublicKey = REDACTED
# 0.0.0.0/0 - (0.0.0.0/8, 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 240.0.0.0/4, 162.159.192.1/32, 1.1.1.1/32) + 172.16.0.0/24
# 162.159.192.1 is for engage.cloudflareclient.com
# reference: https://github.com/ViRb3/wgcf/issues/42, https://www.procustodibus.com/blog/2021/03/wireguard-allowedips-calculator/
AllowedIPs = 1.0.0.0/8, 2.0.0.0/7, 4.0.0.0/6, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/3, 96.0.0.0/4, 112.0.0.0/5, 120.0.0.0/6, 124.0.0.0/7, 126.0.0.0/8, 128.0.0.0/3, 160.0.0.0/7, 162.0.0.0/9, 162.128.0.0/12, 162.144.0.0/13, 162.152.0.0/14, 162.156.0.0/15, 162.158.0.0/16, 162.159.0.0/17, 162.159.128.0/18, 162.159.192.0/32, 162.159.192.2/31, 162.159.192.4/30, 162.159.192.8/29, 162.159.192.16/28, 162.159.192.32/27, 162.159.192.64/26, 162.159.192.128/25, 162.159.193.0/24, 162.159.194.0/23, 162.159.196.0/22, 162.159.200.0/21, 162.159.208.0/20, 162.159.224.0/19, 162.160.0.0/11, 162.192.0.0/10, 163.0.0.0/8, 164.0.0.0/6, 168.0.0.0/8, 169.0.0.0/9, 169.128.0.0/10, 169.192.0.0/11, 169.224.0.0/12, 169.240.0.0/13, 169.248.0.0/14, 169.252.0.0/15, 169.255.0.0/16, 170.0.0.0/7, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/4, 172.16.0.0/24
Endpoint = engage.cloudflareclient.com:2408
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment