Skip to content

Instantly share code, notes, and snippets.

@Alextrapixel
Created March 24, 2023 06:26
Show Gist options
  • Save Alextrapixel/ba2f8e4b4988b62404abda310a0ae37e to your computer and use it in GitHub Desktop.
Save Alextrapixel/ba2f8e4b4988b62404abda310a0ae37e to your computer and use it in GitHub Desktop.
Cloudflare Warp 1.1.1.1 tunel VPN with wireguard. Can be used for Raspberry Pi 4 and other arm based PC.

Notice : This instruction will used unofficial CLI for Cloudflare Warp

If you have an arm based PC like Raspberry Pi, OrangePi, etc and need to use cloudflare warp 1.1.1.1 service, currently there is no warp package for arm arch. Here I'll show how to use warp with unofficial CLI for CLoudflare Warp called wgcf and wireguard package as open-source VPN tunnel software.

Download Package

wgcf

get wgcf here => https://github.com/ViRb3/wgcf/releases

wireguard

ubuntu/debian => apt install wireguard

Installation

Create wgcf profile for wireguard

  1. Download wgcf and make sure to get the supported architecture. Here I get wgcf_2.2.15_linux_arm64 for my Raspberry Pi 4.
  2. Rename the downloaded file with preferred name for easy usage. Here I rename it as wgcf. [optional]
  3. Make it executable with chmod +x wgcf
  4. Copy it to /usr/local/bin to make it executable anywhere (global accessible). cp wgcf /usr/local/bin
  5. Register cloudflare warp account wgcf register. The new account will be saved under wgcf-account.toml
  6. Generate wireguard profile with wgcf generate. The WireGuard profile will be saved under wgcf-profile.conf.

Wireguard client setup and connect it

  1. Create wireguard directory => mkdir /etc/wireguard/
  2. chmod 700 /etc/wireguard/
  3. Copy wgcf-profile.conf file to /etc/wireguard => cp wgcf-profile.conf /etc/wireguard
  4. Start connection with warp from the client => wg-quick up wgcf-profile
  5. [optional] If you get error resolvconf: command not found then you can install openresolv => apt install openresolv and then re-run wg-quick up wgcf-profile

Disconnect cloudflare warp

You can disconnect with wg-quick down wgcf-profile

[optional] Checking and Inspect Wireguard

  • inspect the wireguard device created => sudo wg show
  • display the IP address of an outgoing connection. You should see here the IP address of your server => curl ipinfo.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment