A comprehensive guide to setting up a secure VPN tunnel to a VPS in the cloud in the US or Canada to activate the full feature set of the Meta Ray-Ban smart glasses.
This guide is not intended to violate Meta’s terms of service. If you do not meet their geographic requirements, please follow the applicable rules. The instructions here can be used for those who are genuinely eligible (e.g., U.S. or Canadian residents temporarily abroad) or for educational purposes to understand how VPNs work.
Meta’s Ray-Ban smart glasses are a great piece of technology. However, some features (Meta AI Assistant) are only available in the US and Canada. Meta View, the companion app, detects traditional VPN solutions (like NordVPN, CyberGhost, or ExpressVPN) and asks the user to disable them during the installation process. This guide will show you how to create a VPN tunnel from your computer to America and how to connect your phone to this tunnel to do the initial setup of the Meta Ray-Ban smart glasses. After this setup, no VPN is needed to use the glasses.
- A computer with a wired internet connection (Wi-Fi reserved for the hotspot for the phone)
- Mobile phone
- Ray-Ban Meta Smart Glasses
This guide was tested on a Linux machine and an Android phone. The steps might differ slightly on macOS, Windows, or iOS devices. On Windows, you can use the Windows Subsystem for Linux (WSL) to easily follow the guide. On macOS, the steps should the same or very similar to the Linux ones.
Experience level: Intermediate/Advanced. You should be comfortable with the command line and basic networking concepts.
-
Setting up a VPS (Virtual Private Server) in the US or Canada:
You will rent a small, inexpensive server in a North American region. This VPS will serve as the endpoint for your VPN tunnel, giving you an IP address in the required region. -
Installing and Configuring WireGuard on the VPS:
WireGuard is a modern, fast, and secure VPN protocol. We’ll install it on the VPS and set it up to accept an encrypted tunnel from your computer. -
Setting up WireGuard on Your Computer:
After configuring the server, you’ll generate keys on your computer, add your computer’s public key as a peer on the VPS, and bring the tunnel online. This will route your computer’s traffic through the VPS, effectively placing it in the US or Canada. -
Creating a Wi-Fi Hotspot on Your Computer:
Once your computer is connected via the WireGuard tunnel, you’ll share this VPN connection with your phone by creating a hotspot. When your phone connects to this hotspot, all its traffic will be routed through the VPS as well, making it appear as if you’re physically located in the US or Canada. -
Completing the Meta Ray-Ban Smart Glasses Activation:
With your phone now effectively “in” the desired region, you can run the Meta View app and set up your Ray-Ban smart glasses. After the initial setup and testing all features, you can disable the VPN tunnel and the hotspot and connect your phone back to your regular network (mobile data or Wi-Fi).
If you don’t already have a VPS provider, consider using services like Google Cloud Platform GCP, Amazon Web Services AWS, Microsoft Azure, or DigitalOcean. I've picked GCP because other providers wouldn't accept my Revolut card. Additionally, GCP offers a free trial with a $300 credit for 90 days.
Students can apply for GitHub Student Developer Pack - GitHub Education containing $200 at DigitalOcean, $100 at Azure (+25 Free cloud services, no credit card required), GitHub Copilot for free, and more.
Follow these steps to set up a VPS on GCP, but the process should be similar on other platforms:
- Create a GCP account:
Go to the Google Cloud Platform website and create an account. You will need to provide your credit card details, but you won’t be charged unless you exceed the free trial limits. - Create a new project:
After logging in, create a new project. You can name it whatever you like. - Create a new VM instance:
In the GCP console, navigate to Compute Engine > VM instances and click theCreatebutton.- Machine configuration:
- Name: Give your instance a name (e.g.,
vps-us-1). - Region: Choose a region in the US or Canada (e.g.,
us-central1 (Iowa)). - Zone: Choose a zone in the selected region (e.g.,
us-central1-c). - General purpose:
E2series is the cheapest and sufficient for our needs. - Machine type: Select the smallest machine type available (e.g.,
Shared-core/e2-micro).
- Name: Give your instance a name (e.g.,
- OS and Storage: click
CHANGE- Operating system:
Ubuntu. - Version:
Ubuntu 20.04 LTS. - Boot disk type:
Standard persistent disk. - Size (GB):
10 GBis enough.
- Operating system:
- Click
Createto create the VM instance. You should see it listed in the VM instances dashboard. - In the VM instances dashboard, click
Set up firewall rulesto open the firewall rules configuration:- Click
Create Firewall Rule. - Name:
allow-wireguard-udp-51820 - Network: Select your default VPC network
- Priority: Leave it as default (1000)
- Direction of traffic: Ingress (incoming)
- Action on match: Allow
- Targets: All instances in the network or a specific target as needed
- Source filter:
IP ranges - Source IP ranges:
0.0.0.0/0(all IP addresses) - Protocols and ports: Select
Specified protocols and portsand checkudp. In the text field, type51820 - Click
Create
- Click
- Machine configuration:
2. Installing and Configuring WireGuard on the VPS
-
SSH into your VPS:
In the VM instances dashboard, click theSSHbutton next to your instance. This will open a terminal window in your browser.If you prefer to use your own terminal to
sshinto the VPS, you can do it, but you have to add your public key to the VPS metadata first. This is out of the scope of this guide. -
Update and Install WireGuard:
sudo apt-get update && sudo apt-get install wireguard -yThis ensures you have the latest packages and installs WireGuard.
-
Generate Server Keys:
umask 077 wg genkey | tee server_private.key | wg pubkey > server_public.key
These two files,
server_private.keyandserver_public.key, represent the server’s unique keys. Keep the private key secret. The public key will be shared with the client. -
Create the WireGuard Configuration File:
sudo nano /etc/wireguard/wg0.conf
Add the following:
[Interface] Address = 10.8.0.1/24 ListenPort = 51820 PrivateKey = <contents_of_server_private.key> PostUp = sysctl -w net.ipv4.ip_forward=1 && iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ens4 -j MASQUERADE PostDown = iptables -t nat -D POSTROUTING -s 10.8.0.0/24 -o ens4 -j MASQUERADENote:
- Replace
<contents_of_server_private.key>with the actual private key string (no quotes, just the key). ens4is the default network interface name on GCP Ubuntu VMs. Runip aif you need to confirm the interface name.- The
PostUpandPostDowncommands enable IP forwarding and set up NAT, allowing connected clients to access the internet through the VPS.
- Replace
-
Start and Enable WireGuard:
sudo systemctl start wg-quick@wg0 sudo systemctl enable wg-quick@wg0Check the status:
sudo wg show
You should see the
wg0interface with the server’s public key and no peers yet.
(Tested on Linux; on macOS you can install WireGuard via Homebrew, and on Windows, you can use the official WireGuard client or via WSL.)
-
Install WireGuard on Your Computer: On a Debian/Ubuntu-based Linux:
sudo apt-get install wireguard -y
On macOS:
brew install wireguard-tools
On Windows, download the official WireGuard installer.
-
Generate Client Keys:
umask 077 wg genkey | tee client_private.key | wg pubkey > client_public.key
Similar to the server, you now have a private and public key for your client. You can display the public key with:
cat client_public.key
Select the output and copy (right click - copy) it to your clipboard for the next step.
-
Add Your Client as a Peer on the VPS: On the VPS (remote server terminal):
sudo nano /etc/wireguard/wg0.conf
Add to the end of the file:
[Peer] PublicKey = <client_public_key_contents> AllowedIPs = 10.8.0.2/32Replace
<client_public_key_contents>with the actual contents ofclient_public.keygenerated on your computer. This assigns10.8.0.2as the client’s IP within the tunnel.Save and exit, then:
sudo systemctl restart wg-quick@wg0
-
Create the Client Configuration: On your local machine:
sudo nano /etc/wireguard/wg0.conf
Add:
[Interface] Address = 10.8.0.2/24 PrivateKey = <client_private_key_contents> DNS = 8.8.8.8 [Peer] PublicKey = <server_public_key_contents> Endpoint = your_vps_ip:51820 AllowedIPs = 0.0.0.0/0 PersistentKeepalive = 25PrivateKeyis your client’s private key.PublicKeyunder[Peer]is the server’s public key fromserver_public.keyfile.your_vps_ipis the external IP of your VPS, which you can find in the GCP console - VM Instances dashboard, next to your instance in theExternal IPcolumn.
-
Start the Tunnel:
sudo wg-quick up wg0
Test your IP:
curl https://api.ipify.org
If you see a US/Canadian IP, your traffic is now routed through the VPS.
You want your phone to use this tunnel. The easiest way is to share your tunneled connection via a hotspot.
-
Create the Hotspot (Linux Example):
nmcli dev wifi hotspot ifname wlp0s20f3 ssid "US-Network" password "mypassword123"
Adjust
ifnameandssidas needed. Checkip ato verify the interface name assigned to your hotspot. The common interface names arewlan0,wlp0s20f3, orwlp3s0. (On macOS, you can share your connection via System Preferences. On Windows, use the built-in Mobile Hotspot feature.) -
Enable IP Forwarding and NAT on Your Computer:
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
Suppose the hotspot’s subnet is
10.42.0.0/24(default for NetworkManager hotspots). Add a NAT rule:sudo iptables -t nat -A POSTROUTING -s 10.42.0.0/24 -o wg0 -j MASQUERADE
If your hotspot uses a different subnet, adjust accordingly.
-
Connect Your Phone to the Hotspot: On your phone, connect to the “US-Network” Wi-Fi using the provided password.
If DNS doesn’t work, set the DNS server on your phone’s Wi-Fi settings to8.8.8.8.
Your phone’s traffic now travels: Phone → Hotspot on Computer → WireGuard Tunnel → VPS in the US/Canada → Internet
-
Install and open the Meta View App on Your Phone: With the phone now appearing as if located in the US or Canada, install and launch the Meta View app and follow the instructions to set up your Ray-Ban smart glasses. The initial region lockout and checks should no longer block you. I registered via e-mail, not guaranteeing that choosing your Instagram or Facebook account won't trigger the region lock. I also turned my mobile data off to ensure the phone uses the VPN connection. I agreed to all permissions the installation process asked for.
-
Testing Features: Once the glasses are set up, test all features. Camera, speakers, and the Meta AI Assistant should work as expected.
-
Disconnect phone from the hotspot and connect back to your regular network (mobile data or Wi-Fi). The Ray-Ban Meta glasses and the Meta View app should continue to work as expected.
-
Shutting Down the VPN Tunnel and Hotspot: When you’re done, you don’t need to keep the VPN and hotspot running.
sudo wg-quick down wg0
Stop the hotspot:
nmcli connection down Hotspot nmcli connection delete Hotspot
You can also suspend, shut down or remove the VPS if it’s no longer needed for other purposes.
By following these steps, you’ve created a custom VPN tunnel that makes your computer and phone appear in the U.S. or Canada without using traditional VPN apps (which some apps may detect). This method enables you to access and set up region-locked features of the Meta Ray-Ban smart glasses. After the initial setup, you can return to your normal network usage without the VPN tunnel.
Enjoy your fully-functional Ray-Ban smart glasses! 🤓