Introduction

You’re holding a detailed step-by-step guide that will teach you how to build and set up a budget-friendly mobile proxy node from scratch using a mini-PC like the Raspberry Pi or Orange Pi. We will cover everything from selecting the board, modem, and power supply to installing the operating system, drivers, and software, configuring the proxy server, setting it to auto-start, ensuring stability, and testing. The end result: you’ll have a locally or remotely accessible HTTP(S)/SOCKS5 mobile proxy running on a 4G/5G modem, with the ability to restart sessions for new mobile IP addresses and a basic monitoring and logging system.

Who is this guide for: beginners encountering Raspberry Pi or Orange Pi for the first time and looking for a clear, straightforward instruction without any gaps. Along the way, we’ll share some advanced tips for those who want to get the most out of their hardware. This guide is suitable for home labs, mobile product testing departments, internal company infrastructure, and educational projects.

What you need to know beforehand: basic skills in using the Linux terminal at a copy-paste command level, the ability to write a system image to a microSD card, and plug in the necessary cables. We’ll explain everything else. We intentionally avoid professional jargon or clarify it when used.

How much time you’ll need: with all components ready, it should take 2-4 hours, including OS installation and updates. Downloading packages and firmware may take longer if the internet connection is slow.

Quick links to sections: go to selecting the board, modem, and power supply, go to configuring the proxy server.

⚠️ Attention: Use this guide strictly within the scope of applicable laws. Do not use a proxy for illegal activities or try to bypass restrictions or blocks. Comply with the terms of your service agreement with your carrier.

Tip: If you prefer a ready-made cloud-based mobile IP management option without building from scratch, consider specialized services. For example, check out mobileproxy.space as a reference to understand the capabilities of such solutions and functionalities you can partially replicate on your node.

Preparation

Before you start, ensure that you have all the tools, access, and software ready. This section will save you from interruptions during the process.

Necessary Tools, Software, and Access

  • A computer with Windows, macOS, or Linux to write the system image to the microSD card.
  • A microSD card reader.
  • Internet access to download OS images and packages.
  • An SSH client terminal (Windows: built-in PowerShell or any SSH client; macOS/Linux: built-in terminal).
  • A program to write images: Raspberry Pi Imager or any utility for writing images to microSD cards.

System Requirements

  • Mini-PC: Raspberry Pi 3B/3B+/4B/5 or Orange Pi (e.g., Orange Pi PC, Orange Pi Zero2, Orange Pi 3 LTS, Orange Pi 5). We recommend at least Raspberry Pi 3B+ or a comparable Orange Pi.
  • Storage: A microSD card of 16–32 GB A1/A2 class. For stability, 32 GB is better.
  • Power supply: For Raspberry Pi 4 — 5V 3A with USB-C; for Raspberry Pi 3 — 5V 2.5A micro-USB; for Orange Pi — according to the model (usually 5V 3A USB-C or 5V 2–3A DC).
  • Mobile modem: A 4G/5G USB modem or a modem in mini-PCIe/M.2 in a USB adapter. Popular choices: Huawei E3372 (Stick or HiLink), ZTE MF833, Quectel EC25/EG25-G/EP06/EM12, Sierra Wireless EM7455/EM7565 (via USB adapter). For 5G: Quectel RM500Q/RM520N (via M.2-USB adapter with power supply and antenna).
  • A SIM card with an active data plan. Confirm the APN and any limitations with your carrier.
  • An Ethernet cable or access to Wi-Fi for the initial setup.

What to Download and Install in Advance

  1. Download Raspberry Pi Imager or prepare your image writing utility.
  2. For Raspberry Pi: use Raspberry Pi OS Lite (Bookworm, 64-bit) for a minimal system. For Orange Pi: download the appropriate Armbian (based on Debian 12, kernel 6.x), Lite version without a GUI.
  3. Prepare your SSH client (e.g., standard OpenSSH).
  4. Gather APN parameters from your carrier: APN name, and, if necessary, a username and password. Example: APN — internet, username — blank, password — blank. Look for accurate details in your carrier’s documents.

Creating Backups

If you are repurposing an already configured microSD card, make a backup of the image. On Windows, you can use any card image reading utility; on macOS/Linux, use the dd command to create an image file. Store the copy on an external drive.

Tip: Keep a notes file where you copy all commands and settings. This will save you time during reconfiguration or when transferring to another board.

Basic Concepts

Key Terms Explained Simply

  • Mobile Proxy — a proxy server that connects to the internet through a mobile network (4G/5G). Websites see a mobile IP.
  • ModemManager — a Linux service for managing mobile modems through standard interfaces (QMI, MBIM, PPP, AT commands).
  • QMI/MBIM/NCM — methods for Linux to communicate with the modem. QMI and MBIM are modern and fast; PPP is outdated and slow; NCM is Ethernet emulation for some modems.
  • 3proxy — a lightweight proxy server capable of handling HTTP, HTTPS (CONNECT), SOCKS5, authentication, and logging.
  • IP Change — restarting the modem session (or “airplane mode”) to receive a new mobile IP from the carrier. There are no guarantees: the carrier may return the same address.

Key Working Principles

The mini-PC connects to the mobile modem via USB. The modem registers on the network, initializes the mobile interface, and receives an IP from the carrier. A proxy server starts on the mini-PC, listening on a designated port and accepting connections from the local network or via port forwarding from the router. Client traffic flows through the modem. Upon request, you can restart the modem session for IP rotation.

Important Understanding Before You Start

  • Power is Critical: USB modems consume up to 0.5–1 A at peak. A quality power supply and a good USB cable are required. For 5G modems, consider using an active USB hub with external power.
  • Cooling: Raspberry Pi 4/5 and powerful Orange Pi models generate heat. Install a heatsink and a fan.
  • Network Coverage: speed and stability depend on the quality of the LTE/NR signal. Use external antennas and place them correctly.
  • Legality: operate strictly within the law and the carrier’s rules.

⚠️ Attention: Do not attempt to modify the IMEI or other device identifiers. This is illegal. All settings in this guide are legal and based on standard Linux tools.

Step 1: Selecting the Mini-PC, Modem, and Power Supply

Goal of the Stage

Select compatible and reliable hardware components to avoid problems at the start.

Detailed Step-by-Step Instructions

  1. Select the board. For the most stable start, choose the Raspberry Pi 4B with 2–4 GB RAM. If modern performance is required, go for the Raspberry Pi 5. An alternative: Orange Pi 3 LTS or Orange Pi 5 (note the differences in Armbian images).
  2. Select a USB modem. For simplicity — Huawei E3372 in Stick mode or ZTE MF833. For flexibility and speed — Quectel EG25-G or EP06/EM12 via a powered USB adapter with antennas. For 5G — Quectel RM520N-GL with USB 3.0 adapter and external power supply.
  3. Check the frequencies. Ensure that the modem and the carrier support the required LTE/5G bands in your region.
  4. Prepare the power supply. For Raspberry Pi 4 — a 5V 3A power supply with a good cable; for the 5G modem — an active USB hub rated 5V 2-3A.
  5. Get a 32 GB A1/A2 microSD card. A card from a reliable brand will reduce the chance of failures.
  6. Ensure proper cooling: heatsinks and a fan in the case.
  7. Purchase antennas for the modem if they are not included. For Quectel, two LTE/NR antennas (SMA) are often required.

Important Points

  • Power Stability determines whether the modem will drop under load.
  • Antenna Placement enhances signal quality and overall speed.
  • Compatibility: Raspberry Pi OS and Armbian support most modems through ModemManager and drivers such as qmi_wwan/cdc_mbim/option.

Tip: If in doubt about the modem — choose Quectel EG25-G as a reliable middle-ground for compatibility and stability on 4G.

Expected Outcome

You will have a complete setup: a mini-PC, memory card, power supply, USB modem with SIM card, antennas, cables, and cooling.

Possible Issues and Their Solutions

  • Issue: The modem gets too hot. Solution: Use an active hub, extend the modem to a USB extender, and add a heatsink to the adapter.
  • Issue: Weak signal in the room. Solution: Use an external antenna, move the modem closer to the window, apply a longer USB cable.
  • Issue: Not sure if it’s Stick or HiLink mode for Huawei E3372. Solution: We can configure both types; HiLink will require a different connection management approach.

✅ Check: Check the completeness and compliance of the components. Write down the modem's IMEI and model for inventory purposes (only for record-keeping, do not change the IMEI).

Step 2: Installing the OS and Basic Packages

Goal of the Stage

Deploy an up-to-date, non-graphical OS, enable SSH, update the system, and install the tools needed for further setup.

Detailed Step-by-Step Instructions

  1. Write the image. Insert the microSD into the card reader. Open Raspberry Pi Imager or your chosen utility. Select Raspberry Pi OS Lite (Bookworm, 64-bit) for Raspberry Pi or the appropriate Armbian Lite version for Orange Pi. Specify the memory card and click the write button. Wait for the process to complete and verify.
  2. Enable SSH. For Raspberry Pi: after writing, eject and reconnect the card to the PC. In the boot partition, create an empty file named ssh without an extension. For Armbian SSH is enabled by default.
  3. Initial startup. Insert the microSD card into the board, connect Ethernet to the router, and plug in the power supply. Wait 1-2 minutes for the system to deploy for the first time.
  4. Find the board’s IP address. On the router, check the list of DHCP clients and look for the Raspberry Pi/Orange Pi device. Or use a network scanner. Let’s assume the address is 192.168.1.50.
  5. Connect via SSH. On Windows, open PowerShell and run: ssh pi@192.168.1.50 (for Raspberry Pi, the default password is raspberry unless changed in the image). For Armbian, the first login will require setting a password and creating a user.
  6. Update the system. Run sequentially: sudo apt update, then sudo apt full-upgrade -y. Wait for the process to complete. Reboot: sudo reboot. Reconnect via SSH.
  7. Install basic packages: sudo apt install -y modemmanager usb-modeswitch usbutils psmisc jq curl socat netcat-traditional. For QMI/MBIM modems, add: sudo apt install -y libqmi-utils libmbim-utils.
  8. Install networking tools: sudo apt install -y iproute2 iptables ufw ca-certificates.
  9. Set the timezone: sudo timedatectl set-timezone Europe/Moscow (or your city). Enable time synchronization: sudo timedatectl set-ntp true.

Important Points

  • Use Lite images that are free of a GUI. They consume fewer resources and are more stable.
  • Reboot after major kernel updates and firmware installations.
  • Record your access

Tip: Set a static hostname: sudo hostnamectl set-hostname mobi-proxy-01. This will simplify network navigation.

Expected Outcome

The mini-PC is accessible via SSH, updated, and has installed ModemManager, QMI/MBIM tools, and networking utilities.

Possible Issues and Their Solutions

  • Issue: No SSH connection. Solution: Check if the ssh file is on the boot partition (for Raspberry Pi), confirm the network cable is plugged in, and check the DHCP table on the router.
  • Issue: Update hangs. Solution: Wait, then check if the memory card is full. A restart can be done via sudo reboot. If it hangs again, rewrite the image.
  • Issue: Packages are not available. Solution: Check date/time, DNS, and route with ping 1.1.1.1 and ping debian.org. Fix the network.

✅ Check: Run mmcli -L. The modem might not be present yet, but the command should work and not return errors about ModemManager not found.

Step 3: Connecting and Configuring the Mobile Modem

Goal of the Stage

Ensure that the modem is consistently detected by the system, registered on the network, and establishes a mobile connection on Linux.

Detailed Step-by-Step Instructions

  1. Connect the modem to the board. For power-hungry modems, use an active USB hub. Insert the SIM card into the modem before connecting.
  2. Check device detection: lsusb. You should see a line with the modem’s name (Huawei, ZTE, Qualcomm, Quectel). Save the output for notes.
  3. Check the ports: dmesg | tail -n 50. You should see devices like /dev/ttyUSBx or network interfaces like wwan0, cdc-wdm0, usb0 or eth1 depending on the mode.
  4. Check if ModemManager detects the modem: mmcli -L. You should see the modem, e.g., /org/freedesktop/ModemManager1/Modem/0.
  5. Unlock the modem when prompted for a PIN: mmcli -m 0 --pin=1234 (replace with your PIN if activated). It’s best to disable the PIN in the phone beforehand.
  6. Set the APN. For the default profile: mmcli -m 0 --simple-connect="apn=internet,user=,password=" or mmcli -m 0 --3gpp-operator-format=long if necessary. For MBIM: use mbimcli -d /dev/cdc-wdm0 --attach-packet-service with subsequent configuration via ModemManager — it’s often simpler to just use mmcli --simple-connect.
  7. Check the status: mmcli -m 0. In the Status section, you should see state: connected, and in the Bearer — connection parameters.
  8. Check the interface: ip a. An interface like wwan0 or usb0/ncm0 in the respective mode should appear. Run ip route to see the default route through the mobile interface.
  9. Check internet connectivity: curl -4 ifconfig.me and curl -4 ipinfo.io/ip (or any similar service). You should see the public mobile IP address.

Important Points

  • Modem modes: E3372 can operate in either HiLink (router) or Stick (modem) mode. In HiLink mode, the interface will be something like eth1/usb0 with an internal address, managed through the modem’s web interface. In Stick mode — through QMI/NCM/PPP. We recommend Stick or a full QMI/MBIM modem (Quectel).
  • No third-party patches unless necessary: modern kernels support most modems.
  • Antennas: connect both MIMO antennas for stable 4G/5G signals.

Tip: For Quectel modems, the main AT port is usually /dev/ttyUSB2. The command echo -e "AT+CSQ\r" | socat - /dev/ttyUSB2,crnl will show the signal strength. A CSQ of 15 or higher is good.

Tip: If you have a HiLink modem, first open its web interface in a browser at the address displayed in ip a (usually 192.168.8.1), then enable mobile data and check the connection status.

Expected Outcome

The modem registers and connects to the network successfully. Curl commands return the public mobile IP.

Possible Issues and Their Solutions

  • Issue: The modem does not appear in mmcli -L. Cause: incorrect mode or insufficient power. Solution: connect via an active USB hub; for Huawei — ensure it's in Stick mode, install usb-modeswitch (already installed), and restart.
  • Issue: Hardware locked with a PIN. Solution: disable the PIN on the SIM in your phone; or unlock it via mmcli -m 0 --pin=XXXX.
  • Issue: No internet. Cause: incorrect APN. Solution: confirm the APN with your carrier; for some plans, a username/password may be required, apply --simple-connect with credentials.
  • Issue: IP does not change upon reconnection. Cause: the carrier may cache the address. Solution: wait for the timeout or perform a full power recycle (see the rotation section below).

✅ Check: Run mmcli -m 0 and ip a. You should see state as connected and an active interface with addressing. curl -4 ifconfig.me should return the mobile IP.

Step 4: Configuring the Proxy Server

Goal of the Stage

Install and configure the lightweight proxy server 3proxy to provide internet access via the mobile modem.

Detailed Step-by-Step Instructions

  1. Install 3proxy. On Debian/Ubuntu-like systems, the package is often available: sudo apt install -y 3proxy. If the package is not available, install it by compiling from source or use alternatives like tinyproxy/dante. We will continue with 3proxy.
  2. Create a configuration and logs directory if they don’t exist: sudo mkdir -p /etc/3proxy /var/log/3proxy. Check where the configuration file is located in your build (typically /etc/3proxy/3proxy.cfg).
  3. Create the configuration file: sudo nano /etc/3proxy/3proxy.cfg and paste a basic config: daemon nscache 65536 config /etc/3proxy/3proxy.cfg monitor /etc/3proxy/3proxy.cfg log /var/log/3proxy/3proxy.log D logformat "%d %H:%M:%S %u %C:%c %R:%r %O %I %T" rotate 10 users user:CL:strongpassword auth strong allow user proxy -p3128 -a socks -p1080 flush. Explanation: we’re enabling daemonization, logging, setting user user with password strongpassword, raising HTTP proxy on port 3128 and SOCKS5 on 1080. Change ports and credentials as needed.
  4. Restrict access by IP (recommended). Add lines before running the proxy: allow user * 192.168.0.0/16 or a specific trusted IP/subnet; or use a firewall. A simple line example: allow user for access only with authorization.
  5. Allow binding on all interfaces. By default, the service listens on 0.0.0.0. If you want to listen only on the local network — use the -i flag with the mini-PC’s local IP, like: proxy -p3128 -a -i192.168.1.50. For SOCKS, similarly: socks -p1080 -i192.168.1.50.
  6. Create a systemd unit (if not created by the package). Open: sudo nano /etc/systemd/system/3proxy.service. Insert: [Unit] Description=3proxy After=network-online.target Wants=network-online.target [Service] Type=simple ExecStart=/usr/bin/3proxy /etc/3proxy/3proxy.cfg Restart=always RestartSec=3 LimitNOFILE=65536 [Install] WantedBy=multi-user.target. Save the file, then run: sudo systemctl daemon-reload, sudo systemctl enable --now 3proxy.
  7. Check the status: systemctl status 3proxy. You should see the status as active (running). If there’s an error — check journalctl -u 3proxy -e.
  8. Configure UFW. Enable the firewall: sudo ufw default deny incoming, sudo ufw default allow outgoing, sudo ufw allow 22/tcp (SSH), sudo ufw allow 3128/tcp, sudo ufw allow 1080/tcp if needed. Enable it: sudo ufw enable. Check the rules: sudo ufw status.
  9. Check the proxy access from a client on the local network. Specify the mini-PC's IP and port 3128 (HTTP) or 1080 (SOCKS5), enter username/password user/strongpassword. Open an IP identification site and ensure it shows the mobile IP.

Important Points

  • Do not leave the proxy open. Always use authorization and restrict by IP or firewall.
  • Store passwords in a password manager. Change them regularly.
  • Logs: check /var/log/3proxy/3proxy.log regularly.

Tip: If you only want SOCKS5, remove the proxy -p3128 -a line and keep only socks -p1080. This will reduce the attack surface.

Tip: For multiple users, add them in the users section separated by a colon, e.g., users alice:CL:pass1 bob:CL:pass2.

Expected Outcome

3proxy is running as a service, accessible on the specified ports, protected by a password and a firewall.

Possible Issues and Their Solutions

  • Issue: The service won't start. Cause: an error in the configuration. Solution: check the syntax, simplify to a minimal configuration, and add options one by one.
  • Issue: The client cannot connect. Cause: UFW blocking. Solution: check ufw status and the validity of allowed ports.
  • Issue: Authorization fails. Solution: check the users section, ensure there are no extra spaces, restart the service.

✅ Check: On the client, specify the proxy server, authenticate, and visit an IP output page. The mobile IP of the modem should display.

Step 5: Enabling Auto-Start and Increasing Stability

Goal of the Stage

Ensure that all components auto-start after a reboot, add self-recovery of connection, and secure IP rotation.

Detailed Step-by-Step Instructions

  1. Check the auto-start for 3proxy. We have already enabled systemctl enable --now 3proxy. Ensure that after sudo reboot, the service starts.
  2. Add a service to connect the modem at startup. While ModemManager itself will raise the Bearer with --simple-connect, it’s more reliable to create a small service. Create a file /usr/local/bin/cell-up.sh with content: connecting via mmcli -m 0 --simple-connect="apn=internet" with a status check. Make the file executable: sudo chmod +x /usr/local/bin/cell-up.sh.
  3. Create unit /etc/systemd/system/cell-up.service with the following lines: [Unit] Description=Cellular bring-up After=ModemManager.service network-online.target Wants=network-online.target [Service] Type=oneshot ExecStart=/usr/local/bin/cell-up.sh RemainAfterExit=yes [Install] WantedBy=multi-user.target. Apply: sudo systemctl daemon-reload && sudo systemctl enable --now cell-up.
  4. IP rotation script. Create /usr/local/bin/cell-rotate.sh. Option 1 for QMI/MBIM/Quectel: disconnect, wait, reconnect: mmcli -m 0 --disconnect; then mmcli -m 0 --set-power-state=low, wait 3-5 seconds, then mmcli -m 0 --set-power-state=on and reconvene --simple-connect. For AT support, send AT+CFUN=1,1 on port /dev/ttyUSB2 to reboot the modem. For HiLink, use the modem’s HTTP API for disconnect/connect (if available). Add logs and timeout of 10-30 seconds for registration.
  5. Ensure the rotation works properly. Run sudo /usr/local/bin/cell-rotate.sh and compare curl -4 ifconfig.me before and after. Schedule a cron job if necessary, but do not rotate too frequently to avoid violating carrier rules.
  6. Modem watchdog. Create /usr/local/bin/cell-watchdog.sh, which pings a reliable address (e.g., 1.1.1.1) every 60 seconds, and after 3 failed attempts consecutively runs cell-rotate.sh. Structure a systemd unit with type simple and Restart=always.
  7. Log monitoring. Enable log rotation in 3proxy already noted by the rotate 10 parameter. For system logs, ensure that journald has default storage limits.
  8. Fine-tune UFW. Only leave open the essential ports. If accessing from the internet, configure port forwarding on your router and IP restriction at the 3proxy or UFW levels.

Important Points

  • Rotation intervals should not be too frequent. This affects stability and may contradict carrier policies.
  • Security: for remote access, use only a closed IP list and strong passwords.
  • Logs and Metrics: maintain logs with limited volume to avoid filling up the microSD.

Tip: If you have multiple modems, assign names to interfaces and devices through udev rules to prevent confusion during reboots. For example, create symbolic links based on serial numbers.

Tip: For 5G modems, don’t skimp on an active USB hub and power. It is key to stable performance under load.

Expected Outcome

The system automatically raises the mobile connection and proxy on startup, and upon failures, restarts the connection and restores services.

Possible Issues and Their Solutions

  • Issue: Rotation does not change IP. Reason: the carrier returns the same pool. Solution: increase wait time between disconnect/connect to 30-60 seconds; perform a complete modem power recycling; if necessary, change the connection point (Band) or location.
  • Issue: Watchdog restarts too frequently. Solution: increase the thresholds for activation (e.g., 5-7 failed pings) and the interval between checks.

✅ Check: Reboot the mini-PC. Ensure that 3proxy is available within 1-2 minutes, mobile internet is active, and the rotation script effectively changes the IP.

Step 6: Testing, Monitoring, and Logging

Goal of the Stage

Verify the final configuration, measure base performance, and set up monitoring over the node’s state.

Detailed Step-by-Step Instructions

  1. Check the availability of ports. From a client, open a browser with proxy settings and visit any site. Alternatively, use utilities: curl -x http://user:strongpassword@IP:3128 http://example.com. For SOCKS5: curl --socks5 user:strongpassword@IP:1080 http://example.com.
  2. Check the IP change. Compare results from curl -4 ifconfig.me before and after cell-rotate.sh.
  3. Evaluate speed. Use speedtest-cli (install: sudo apt install -y speedtest-cli) via proxy from the client or directly on the board. Keep in mind that speed depends on the carrier and signal quality.
  4. Check the 3proxy logs: tail -f /var/log/3proxy/3proxy.log. You should see entries about connections, users, and traffic.
  5. Check the system log: journalctl -u ModemManager -e, journalctl -u 3proxy -e. Ensure there are no errors.
  6. Enable basic telemetry. You can schedule a cron job to collect signal metrics via AT commands (e.g., AT+CSQ) and log them for coverage dynamic analysis.

Important Points

  • Realistic Expectations: mobile channels are subject to fluctuations. Plan for contingencies.
  • Logging helps address non-standard situations and optimize configuration.

Tip: If using multiple proxies on one board, distribute ports and users, and indicate the node tag in the log filename to avoid confusion.

Expected Outcome

Connection through the proxy works, the IP is identified as mobile, rotation is active, and logs capture events.

Possible Issues and Their Solutions

  • Issue: Low speed. Cause: weak signal or overloaded cell. Solution: change the modem's location, use external antennas, try a different carrier.
  • Issue: Instability under load. Cause: inadequate power supply. Solution: more powerful PSU, active hub, quality cable, implement cooling.

✅ Check: Obtain mobile IP through the proxy and ensure simple websites load quickly. Run a speed test and compare with expectations.

Verification of Result

Checklist

  • SSH access to the mini-PC works.
  • ModemManager detects the modem, and the connection rises automatically.
  • 3proxy is running as a service and listens on specified ports.
  • Access to the proxy is restricted by passwords and firewall.
  • IP rotation changes the public address in at least some cases.
  • Logs are written, the system does not overheat, and power is stable.

How to Test

  • Open 2-3 IP identification websites through the proxy. Compare addresses before and after rotation.
  • Execute a series of short requests through the proxy and evaluate latency: curl -w "%{time_connect} %{time_starttransfer}\n" -o /dev/null -s http://example.com.
  • Reboot the device. Ensure all services start on their own.

Success Metrics

  • Recovery time after reboot to fully operational status is under 2 minutes.
  • Percentage of successful rotations with IP changes is no less than 50–70% (depends on carrier).
  • Stability under load at 1–2 Mbps without drops for several hours.

Common Errors and Solutions

  • Issue: Proxy is accessible from the internet without a password. Cause: missed authorization and UFW configuration. Solution: enable auth strong and users in 3proxy, restrict access on UFW and IP.
  • Issue: Modem disconnects sporadically. Cause: insufficient power or overheating. Solution: active USB hub, better PSU, cooling, watchdog with restart script.
  • Issue: mmcli cannot find the modem after a reboot. Cause: initialization sequence. Solution: add a dependency After=ModemManager.service and a delay in cell-up.service, check udev rules.
  • Issue: Rotation does not yield new IP. Cause: carrier policy. Solution: increase delay between disconnect/connect, change location; if using HiLink, perform a complete modem re-registration.
  • Issue: Logs fill up the microSD. Cause: excessive logging detail. Solution: reduce detail level, enable rotation and auto-cleaning, move logs to /var/log with rotation.
  • Issue: Low speed on 5G modem. Cause: using USB 2.0 or poor cable. Solution: connect to USB 3.0, use a short shielded cable, active hub, update modem firmware if available.
  • Issue: Port conflict. Cause: other services are already listening on those ports. Solution: change ports in 3proxy and UFW, check ss -tulpen.

Advanced Opportunities

Advanced Configurations

  • Multi-modem configuration. Connect 2-4 modems through an active hub. Create separate 3proxy instances with unique ports and credentials for each modem. Bind outgoing interfaces using ip rule and ip route (policy routing) for explicit traffic separation if needed.
  • API for rotation. Run a lightweight HTTP service via socat or tiny web server that triggers cell-rotate.sh on a GET request. Include basic authorization and IP restriction.
  • Binding to interface. In the 3proxy config, use the -e option for outgoing IP/interface if you have multiple active channels and need to force outgoing traffic through the desired modem.

Optimization

  • File system stability. Enable zram or relocate intensive logs to /tmp or an external SSD if the load is high.
  • Reducing latencies. Place the modem closer to the window, use quality antennas, disable unnecessary daemons in the system.
  • Firmware updates. If necessary, update the modem to the latest stable version using the manufacturer’s official software. Always make backups and do not interrupt the update.

What Else Can Be Done

  • Integration with a control panel. Implement a simple HTML page with buttons for "connect,” "disconnect,” "rotate," and display the status.
  • Client balancing. With multiple modems, manually distribute users across ports of different 3proxy instances for even load distribution.
  • Comparison with ready-made solutions. If scalability, automatic billing, flexible APIs are required, consider specialized services such as mobileproxy.space as an example of functionalities that can be adapted in your local solution. This helps to understand where to evolve.

Tip: Store all scripts in /usr/local/bin and mark them with version and date. This will make maintenance easier.

Tip: Add internal bookmarks in the guide's sections and your documents. For example, “See Step 4 for configuring 3proxy."

FAQ

  1. How many modems can be connected to one mini-PC? Depending on power and hub — usually 2-4 without issues. Ensure each modem has enough current and use an active hub.
  2. Will it work without Ethernet, only via Wi‑Fi? Yes. Connect the mini-PC to Wi-Fi and ensure the router sees the device. The proxy will be accessible via the Wi-Fi IP.
  3. Can I use only SOCKS5? Yes, keep only the SOCKS line in 3proxy and remove the HTTP proxy. This simplifies configuration.
  4. Is a public static IP needed? No, if access is only from your local network. If internet access is required, set up port forwarding on your router and limit access by IP and password. Consider the provider's rules.
  5. How often can I rotate IPs? Safely — no more than a few times an hour. Excessive rotation affects stability and may violate carrier policy.
  6. Can I deploy on an old Raspberry Pi 2? Technically yes, but performance will be limited. We recommend Pi 3B+ or newer.
  7. What if 3proxy is missing from the repository? Use builds from the source or alternatives like tinyproxy (HTTP) and dante-server (SOCKS). The configuration is fundamentally similar.
  8. How can I check the signal level? For Quectel: send AT+CSQ to the modem’s main port, interpretation: 15-20 is average; 20+ is good. For HiLink — check the status in the modem’s web interface.
  9. How to prevent overheating? Install heatsinks and a fan, monitor temperature using vcgencmd measure_temp on Raspberry Pi, keeping it below 70-75°C under load.
  10. Can scripts be reused on another board? Yes. Transfer the files from /usr/local/bin and systemd units, adjusting paths to the modem and APN as needed.

Conclusion

You have built a complete mobile proxy node on the Raspberry Pi or Orange Pi: selected the board, modem, and power supply, installed the OS, activated ModemManager, established the connection, configured 3proxy with authorization and firewall, ensured auto-start, IP rotation, and basic monitoring. Now you have practical experience and a working tool for testing mobile traffic, integrating with internal systems, and educational purposes. You can further enhance the solution: add multiple modems, create a control panel, integrate a rotation API, optimize hardware, and improve fault tolerance logic. For understanding best practices and ready-made features, you can conveniently refer to services like mobileproxy.space, comparing their capabilities to your local environment. If you need to scale quickly, you can combine your nodes with curated solutions.

⚠️ Attention: Always adhere to the laws and your carrier’s agreement. Do not use proxies for illegal tasks, and do not try to bypass restrictions. Keep the device in good working order, monitor its power and temperature.

Tip: Save a backup of the microSD card once fully configured. This will allow quick recovery in case of media failure or experimental changes.