# VPN Mobile Proxy — WireGuard &amp; OpenVPN

> For AI tools: this is the Markdown copy of https://xproxy.io/document/make-vpn-mobile-proxy. Every XProxy guide has one at its URL + `.md`; the index of all guides is https://xproxy.io/llms.txt.

Run a WireGuard or OpenVPN server on each modem, download the client files and route a whole device through a mobile IP.

Every modem in your XProxy box can run its own VPN server. Connect a laptop, phone or router with WireGuard or OpenVPN, and all of its traffic leaves through that modem's mobile IP.

**You need:** a Basic plan or higher (VPN per modem is included) and at least one modem online.

In short

**The whole device**

Apps without proxy settings, games and system services all use the modem's IP.

**WireGuard first**

It is the fastest and lightest. Choose OpenVPN only when your device or network needs it.

**One file per device**

XProxy makes a file for each device. Import it in the app and connect.

## WireGuard or OpenVPN?

|  | WireGuard | OpenVPN |
| --- | --- | --- |
| Port of modem #1 | UDP `8001` | UDP `9001` |
| Speed and battery | Fastest, lightest | Slower, heavier |
| Apps | Official apps for every OS, many routers | OpenVPN Connect, most routers and firewalls |
| Login | A key inside the file | A certificate inside the file, optional username and password |
| Choose it when | Almost always | The device, router or company only supports OpenVPN |

Only need a browser or a scraper? An [HTTP/SOCKS5 proxy](https://xproxy.io/document/how-use-proxy-format-http-socks5) is simpler. Want encryption on a phone with a QR code? Look at [VLESS](https://xproxy.io/document/vless-reality-proxy-setup).

## Set up the VPN

**Step 1: Open VPN Service**

In the menu, open **VPN Service**. Every modem has a row with its **VPN Type/Port**, its status, its data **Quota**, and the **Config** and **Download** buttons.

The first modem uses WireGuard port `8001` or OpenVPN port `9001`. The next modems add 1.

![VPN Service page with the VPN type and port, the Config button and the Download button marked (demo data)](https://media1.xproxy.io/docs/use-proxies/vp-1-list-v1-b.webp)

> The **VPN Settings** button at the top sets the WireGuard and OpenVPN start ports (8000 and 9000). Leave them unless they clash with something on your network.

**Step 2: Set up WireGuard on a modem (WireGuard)**

Click **Config** on the modem you want to use.

1. Turn on **Enable VPN Server**.
2. Check that **VPN Server Type** says **Wireguard**.
3. Set **Number of Clients**: how many devices will use this modem. Each device gets its own file.
4. Turn on **Enable Tunnel to VPS** if devices connect from outside your network (step 3).
5. Click **Save**. XProxy creates the server and one file per device. The **Rotation Link** appears after the first save.

![VPN Configuration window for WireGuard: Enable VPN Server, type, Number of Clients, Enable Tunnel to VPS and Rotation Link marked (demo data)](https://media1.xproxy.io/docs/use-proxies/vp-2-wg-v1-b.webp)

> Never use one file on two devices at the same time: they kick each other off. Some sites load forever? Set **MTU** to 1280 and download the files again.

**Step 3: Set up OpenVPN on a modem (OpenVPN)**

Click **Config** on the modem you want to use.

1. Turn on **Enable VPN Server**.
2. Set **VPN Server Type** to **OpenVPN**.
3. Set **Number of Clients**: how many devices will use this modem. Each device gets its own file.
4. Optional: a **Username** and **Password**. The app asks for them when it connects.
5. Turn on **Enable Tunnel to VPS** if devices connect from outside your network (step 3).
6. Click **Save**. The **Rotation Link** appears after the first save.

![VPN Configuration window for OpenVPN: Enable VPN Server, type, Number of Clients, Username and Password, Enable Tunnel to VPS and Rotation Link marked (demo data)](https://media1.xproxy.io/docs/use-proxies/vp-2-ovpn-v1-b.webp)

> The certificate inside each file is the real protection, so keep every file private. Never use one file on two devices at the same time.

**Step 4: Make it reachable from anywhere**

On the same network as the box you can skip this step. From outside, pick one option:

- **VPS tunnel** (recommended, no router changes). First connect your VPS once with [VPS Forwarding](https://xproxy.io/document/vps-forwarding-to-use-difference-place) (**General Settings → Forwarding Ports**). Then switch on **Enable Tunnel to VPS** in the modem's **Config**.
- **Router.** Forward the **UDP** ports (`8001` and up for WireGuard, `9001` and up for OpenVPN) to the box. See [NAT Forwarding](https://xproxy.io/document/how-public-access-xproxy).

> Set up the VPS from **Forwarding Ports**, not from the **VPS Relay Server** box in *VPN Settings*. That box does not show your saved VPS password, and **Save VPS** there replaces it with an empty one. That breaks VPS forwarding.

**Step 5: Download the client files**

Click **Download** on the modem and pick the address your devices will connect to. You get a ZIP with one file per device.

- **Local IP**: devices on the same network as the box.
- **Public IP**: you forwarded the UDP ports on your router.
- **VPS IP**: **Enable Tunnel to VPS** is on.
- **Specific IP...**: your own domain or DDNS name inside the file.

![The Download menu of a modem with Download and the VPS IP option marked (demo data)](https://media1.xproxy.io/docs/use-proxies/vp-4-download-v1-b.webp)

> Next: import one file on each device. Steps for every device are just below.

## Other options in Config

| Field | What it does |
| --- | --- |
| **MTU** (optional) | Leave it empty. If some sites hang on mobile networks, try 1280, save, and download the files again. |
| **Auto Expire** and **Quota Limit (GB)** | Optional. The VPN switches itself off at that date, or after that much traffic. Handy when you rent access out. |
| **Rotation Link** | Calling it gives this modem a new IP. See [Change the IP](#rotate). |

To switch the type of a running VPN, turn it off and save first, then change the type.

## Connect your device

Import one file per device. Pick your device:

**WireGuard · Windows / macOS**

1. Install the official **WireGuard** app from wireguard.com.
2. Click **Import tunnel(s) from file** and pick a `.conf` file from the ZIP (one file = one device).
3. Click **Activate**. The status turns green and the whole computer uses the modem's mobile IP.

**WireGuard · Android**

1. Install **WireGuard** from Google Play and copy a `.conf` file from the ZIP to the phone (for example to *Downloads*).
2. Open WireGuard, tap **+** and choose **Import from file or archive**.
3. Pick the `.conf` file. The tunnel takes the file name: `8001_1_1` means port 8001, modem #1, device 1.
4. Switch the tunnel on and tap **OK** on the VPN request. The key icon in the status bar shows the phone now uses the modem's mobile IP.
5. Prefer a QR code? On any computer run `qrencode -t ansiutf8 < file.conf` and use **Scan from QR code** in the app.

**WireGuard · iPhone**

1. Install **WireGuard** from the App Store and save a `.conf` file from the ZIP to *Files*.
2. Tap **+** → **Create from file or archive** and pick the file, or use **Create from QR code** with the QR code from `qrencode`.
3. Switch the tunnel on and allow the VPN profile the first time.

**WireGuard · Linux**

```bash
sudo apt install wireguard
sudo cp YOUR-FILE.conf /etc/wireguard/xproxy1.conf   # a .conf from the ZIP
sudo wg-quick up xproxy1
curl https://api.ipify.org        # prints the mobile IP
sudo wg-quick down xproxy1        # disconnect
```

**OpenVPN · Android**

1. Install **OpenVPN for Android** (free, Google Play or F-Droid; **OpenVPN Connect** works too) and copy an `.ovpn` file from the ZIP to the phone.
2. Tap the import icon at the top and pick the `.ovpn` file.
3. Keep the defaults and tap the check mark to save the profile.
4. Tap the profile and accept the VPN request. If you set a username and password in XProxy, enter them now. *Connected: SUCCESS* means the phone now uses the modem's mobile IP.

**OpenVPN · Windows / macOS / iPhone**

1. Install **OpenVPN Connect** from openvpn.net or the App Store.
2. Choose **Import Profile → Upload File** and select an `.ovpn` file from the ZIP.
3. If you set a username and password in XProxy, enter them now. Then tap **Connect**.

**OpenVPN · Linux**

```bash
sudo apt install openvpn
sudo openvpn --config YOUR-FILE.ovpn   # an .ovpn from the ZIP
# in another terminal:
curl https://api.ipify.org
```

Check that it works: `https://api.ipify.org` should show the modem's mobile IP, and [dnsleaktest.com](https://dnsleaktest.com) should not show your home ISP.

What the files look like inside:

**WireGuard .conf**

```
[Interface]
PrivateKey = &lt;this device's private key>
Address = 10.0.1.2/24, fd78:0486:2c09:1::2/64
DNS = 8.8.8.8
MTU = 1420

[Peer]
PublicKey = &lt;XProxy server public key>
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = 51.79.12.34:8001
PersistentKeepalive = 15
```

`Endpoint` is the address you picked in the Download menu plus the modem's WireGuard port. `AllowedIPs = 0.0.0.0/0,::/0` sends all traffic through the modem.

**OpenVPN .ovpn**

```
client
dev tun
proto udp
remote 51.79.12.34 9003
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
verb 3
auth-user-pass            # only when you set a username/password
&lt;ca> … &lt;/ca>
&lt;cert> … &lt;/cert>
&lt;key> … &lt;/key>
&lt;tls-crypt> … &lt;/tls-crypt>
```

The certificate and key inside the file are the real login — keep each file private.

## Change the IP

Copy the **Rotation Link** from the modem's Config. Anyone with the link can rotate that modem without a dashboard login, so it is safe to give to the person using the VPN:

```
curl "https://vpn.example.com/vpn/rotate?token=YOUR_TOKEN"
```

The VPN stays connected. Traffic pauses for a few seconds while the modem gets its new IP. You can set your own domain for these links under **VPN Settings → Rotation Link Domain**. More options: [How to change / rotate IP](https://xproxy.io/document/how-change-rotate-ip).

## Troubleshooting

| Message or symptom | Fix |
| --- | --- |
| "VPN server is not enabled. Please enable VPN server first." | Turn on **Enable VPN Server** in Config and save before you download. |
| "VPS tunnel is not enabled…" | You chose **VPS IP**. Switch on **Enable Tunnel to VPS** for that modem first. |
| "VPN server already enable can not change VPN type!" | Turn the VPN off, save, then change the type and turn it on again. |
| The app never connects from outside | The UDP port is not reachable. Use the VPS tunnel, or forward UDP (not TCP) on your router, and download the files again with the matching option. |
| Connected, but no internet | Check that the modem is online in Proxy Management, and that its Quota or Auto Expire has not switched the VPN off. |
| Some sites load forever | Set MTU to 1280 in Config, save, and download the files again. |
| Two devices keep disconnecting each other | They share one file. Raise **Number of Clients** and give each device its own file. |

## FAQ

### What is the difference between a VPN and a proxy?

A proxy only carries traffic from apps that are told to use it. A VPN carries everything the device sends, including DNS and apps that ignore proxy settings.

### Does a VPN use more mobile data?

It carries all the traffic of the device, including background updates and sync. So yes, usually more than a proxy used by one browser. Use **Quota Limit** to cap it.

### Can I use the VPN and the proxies of the same modem together?

Yes. HTTP/SOCKS5, VLESS and the VPN of a modem all share its mobile IP, so a rotation changes the IP for all of them.

## What next?

Compare all the protocols, or change the IP on a timer.

[Proxy protocols →](https://xproxy.io/document/proxy-protocols-overview) [Change the IP →](https://xproxy.io/document/how-change-rotate-ip)

---

Source: https://xproxy.io/document/make-vpn-mobile-proxy
