How to Create a Mobile Proxy Server with Raspberry Pi

Do you need reliable and unused mobile proxies for your project? In today’s guide, we’ll take you through the process of setting up your mobile proxy server.

Online services have been a rising trend in many people’s lives for well over a decade. Being able to rely on a service for personal or business-related projects is a nice feature. Not only do they help achieve many things, but in many cases, they speed up the projects or minimize the risk or errors.

In this industry, one of the more popular services is proxies. Their popularity has been on a constant rise, and with good reason. They offer excellent flexibility and many advantages, from offering anonymity to bypassing geo-restrictions.

There are multiple types of proxies, and for a long time, the residential ones have been the golden standard. With decent performance and excellent ability to avoid detection, they were a very powerful tool in users’ arsenal. In recent years, people have begun relying more on mobile proxies, which is what we’ll discuss today.

At their core, the mobile proxies are very similar to the residential ones. They are sources from real users, meaning they are IP addresses that ISPs assign to existing connections. The main difference is that the mobile proxies are from cellular devices, so they can range from 3G to 5G, while the residential ones are from home or office connections.

Today’s guide will cover the process of creating your own mobile proxy server at home. It is a technical process, so follow the steps to ensure a successful creation.


Alternatives to creating your own mobile proxy server

own mobile proxy server

As we mentioned in the introduction, the process of creating a mobile proxy server isn’t the most straightforward one. It’s not overly complicated, and as long as you follow the steps, you should be good to go. With that said, some people may want to take the easier route, so what options do they have?

The best one is to get mobile proxies from a reputable provider. One such option is a product from Proxy Seller. We know this to be an excellent proxy provider, and one of the products this company offers is the ability to set up your own proxies. Unlike the DIY process, which we’ll explain further in this guide, with this provider, you’re looking at a very easy setup process that requires no previous knowledge.

One of the best things about this approach is that Proxy Seller sends the physical equipment with everything already set. Your only task is to get SIM cards and power on the devices. It’s a simple process, and thanks to the documentation section on the company’s website, you shouldn’t have any issues getting your proxies up and running in no time. The company claims it’s a 2-step process that will give you access to over 20 functions.

In terms of payment, there are two options. If you have the equipment, you’ll be paying only for the use of the services. On the other hand, Proxy Seller offers the physical equipment that you can purchase in order to start setting up the mobile proxies. There are multiple packages to choose from, depending on how many proxy servers you plan on using.


How to create a mobile proxy server

create a mobile proxy server

With the easy approach out of the way, let’s talk about the DIY option for creating your own mobile proxy server. Some technical knowledge is involved, but with a bit of patience and a few guides, you should be running in about an hour or so.

  • Requirements

There are a few physical things you’ll need before starting this process.

Raspberry Pi

These little pocket-sized computers became popular over a decade ago with DIY enthusiasts. With the proper knowledge, you can get them to do anything you want, including setting up your own mobile proxy server. Order a package, but make sure to get one with a power supply to avoid any potential damage from using a non-supported one.

USB Stick Modem

Mobile providers began offering USB modems for a long time, which is a popular option with people who need internet on the go for their laptops. Each country has multiple providers, meaning you’ll need to look at what’s available locally.

SIM Card

Depending on your provider, you may get the USB modem without a SIM card, which is the following requirement on this list. Keep in mind that you’ll be using this for traffic, so aim for offers that come with included internet. You won’t be making any calls, meaning you shouldn’t bother looking at that side of things. Depending on the provider, some may offer a SIM card included with the USB modem, so it’s best to check the offers beforehand.

MicroSD Card

The microSD card will act as the drive for the Raspberry Pi and you’ll need to have the operating system installed. You can take a shortcut here and order a card with Raspberrian pre-installed, which is what we recommend doing. It saves some time, and all you need to do is put it on the device and boot it up. You can install the operating system yourself if you’re the type of person who wants to play around and learn, but in this case, it won’t make any difference.

Internet Connection

This is a pretty self-explanatory part. To have a mobile proxy server, you’ll need an active internet connection at home or in your office. Even though the Raspberry Pi has Wi-Fi connectivity, we recommend using a LAN connection for better stability and speeds. Wireless networks have come a long way in recent years, but they still have some flaws when compared to a cabled connection.

  • Setting up the server

Setting up the server

Since the option to get a microSD card with the operating system installed, we won’t be covering the installation process. If you want to take that route, there is a step-by-step guide on the company’s website.

With that out of the way, it’s time to leave these things aside and tweak your modem. This server works by utilizing a port that may or may not be closed, and the port in question is 3128. Before you start poking your modem, first you need to check if you need to. There are countless websites that can analyze open ports on a network, and our favorite is https://www.canyouseeme.org/. Enter the port number and see if the port is open.

If it’s open, you won’t have to do anything except connect the Raspberry Pi. If not, then you’ll need to manually open it. This process goes through the port forwarding rules on your modem, but the problem is that each manufacturer has different steps for that. You should check out the modem’s user manual or ask your provider. Sometimes, this feature may be unavailable to the end-user, meaning this process is over for you.

Open-Terminal-Raspberry-Pi

Once that’s done, the next step is to start setting up the device. Make sure to have the USB modem plugged in with the SIM card inserted. Boot the Raspberry Pi, log in, open up the terminal, and enter the following command:

lsusb

This will show you all USB devices, including the dongle modem. You’ll see string looking similar to this:

Bus 001 Device 005: ID 12e8:1405 <device name>

There will be multiple devices on this list, so you’ll need to find the device name that matches the USB modem you got from your provider.

It’s important to pay attention to the section after the device number. In this case, “12e8” is the device’s ID, and the number next to it, “1405” is the mode. Ideally, you’d want the mode to be 1405, but it may be 1403. It may work in this mode, but you’d want it to be in CDC ethernet mode, which is 1405. If you’re not having any luck, you may try to unplug the modem and restart the device.

The final step is to check if the modem is recognized as a communication device. To do that, type in:

Ifconfirg

This command will list all the networking devices. You should see a usb one, which is your modem. If you see it, then it means the modem is recognized, and you start preparing everything. The first step is to update the Raspberry Pi, and there are two commands you’ll need to enter:

sudo apt-get update

sudo apt-get upgrade

The process may take some time, depending on how out-of-date the device is, and will do everything for you.

Once the system is up to date, you can start by typing in:

sudo nano /etc/sysctl.conf

Use the arrow keys on your keyboard and scroll down until you see a line that says “net.ipv4.ip_forward=1”. There will be a “#” sign before it, which you’ll need to remove. With the changes made, you’ll need to press Ctrl+O to save them. To check if the changes are saved properly, run the following command:

sudo sysctl -p

Running the command should return the same message as the line before “net.ipv4.ip_forward=1”, meaning that you’re ready for the next step, which involves running multiple commands one after the other:

sudo apt-get -y install fail2ban software-properties-common build-essential libevent-dev libssl-dev

git clone https://github.com/z3apa3a/3proxy

cd /3proxy/

sudo nano src/proxy.h

The terminal will open another document where you’ll need to make changes. Using the arrow keys, move down until you see a line that says “#define MAXUSERNAME 128”. Above this line, you’ll need to enter the following “#define ANONYMOUS 1”. Save the document by hitting Ctrl+O and continue entering the following commands:

sudo ln -s Makefile.Linux Makefile

sudo make (it may take a while for this command to finish; be patient)

cd 3proxy

sudo make install

sudo systemctl is-enabled 3proxy.service

sudo nano /etc/iproute2/rt_tables

Here, we have another document where you’ll need to make changes. Move to the end, type in “1 gw1” and hit Ctrl+O to save it. If you plan on using multiple dongles, you’ll need to add multiple entries here and increase the numbers – 2 gw2, 3 gw3, 4 gw4, etc. We recommend starting off with 1, just to set everything up and see if it works. You can go back to this later.

Next up is another document that you’ll need to modify. Type in the following commands:

cd

sudo nano 3proxy.cfg

This is a configuration file and you’ll need to enter the following code:

#! /usr/local/bin/3proxy

daemon

nserver 8.8.8.8

nscache 65536

timeouts 1 5 30 60 180 15 60

users root:CL:pass

#log /var/log/3proxy.log

#rotate 30

setgid 13

setuid 13

auth none

allow root

proxy -p3128 -e192.168.0.100

flush

Double-check if everything is correct and save the file by hitting Ctrl+O on your keyboard. There is another file you’ll need to modify, so type in:

sudo nano startproxy.sh

The code for this file is:

Sudo echo "Let's setup the IP"

sudo ifconfig usb0 192.168.0.100

sleep 2

sudo echo "Let's setup the routes for the proxy"

sudo ip route add 192.168.0.0/24 dev usb0 src 192.168.0.100 gw1

sudo ip route add default via 192.168.0.1 dev usb0 table gw1

sudo ip rule add from 192.168.0.100/32 table gw1

sudo ip rule add to 192.168.0.100/32 table gw1

sleep 5

sudo echo "Let's start the proxy "

sudo 3proxy /home/username/3proxy.cfg

Before you save, make sure to modify the last line for your Raspberry Pi device. Where it says “/home/username/3proxy.cfg” make sure to replace “username” with the username of your device, the one you already have set up on your device. Once that’s done, Ctrl+O to save the configuration file. The following two commands are:

sudo chmod 777 startproxy.sh

ifconfig

The second command will outline the IP addresses of all the connections on your Raspberry Pi. Look for the usb0 device and see which IP addresses it has. If it doesn’t, then it could be offline, and you’ll need to double-check the connection.

To run the server and see if it works, run the commands:

sudo ./startproxy.sh

ipconfig

The goal is to see if the IP address for usb0 differs from the one before starting the server. If it is, you’ll know that the process was successful. To check which proxy address you’re using, type in the command:

sudo curl -s https://wtfismyip.com/text --interface usb0

Whichever IP address shows up in the terminal is the one that will be the proxy you’ll have once you start using your server.

Once you verify this, your mobile proxy server will be set up, and you can start using it. To do that, you’ll need to use the following string:

IP:3128:root:pass

The IP is your home address, so make sure to change that before trying your proxy. You can go through your proxy to double-check if everything is working. Once you verify that, we recommend going back to the 3proxy.In the cfg file, find the line that says “users root:CL:pass” and chance root and pass to the way you want your username and password to be. Save the configuration file, and you’ll be good to go.

You can connect to your mobile proxy and use it for any project or activity you need.


FAQ

Q. How many mobile proxy servers can I set up?

There are no limitations regarding the number of servers you can create. The important thing to note is that you’ll need a separate USB modem and a SIM card for each server. If you plan on running many more servers, you may want to consider getting multiple Raspberry Pi devices.

Q. Is it legal to set up a mobile proxy server?

Purchasing a SIM card from a provider means agreeing to the usage policy. You’ll have no issues if you’re not using the proxy for any illegal activities. It’s the same for creating the server. The provider won’t have any issues with that as long as you’re not breaking the law.

Q. Can I connect multiple devices to my mobile proxy server?

Yes, creating a server means that you can connect as many devices to it as you want without any limitations. Keep in mind that if multiple devices are using traffic at the same time, the performance drop may be noticeable. Mobile proxies aren’t known for offering the highest speeds, which is why we’re not recommending them for every possible scenario.

Q. What can I use the mobile proxy server for?

It doesn’t matter if we’re talking about your own mobile proxy server or mobile proxies you purchased from a provider; the list of use cases is similar. You can use it for ad verification, SEO research, accessing geo-restricted content, managing multiple social media accounts, and more.

On the other hand, projects involving a lot of traffic aren’t something these proxies will handle well. The first problem could be the speed, depending on the package the provider offers, but the bigger one is the bandwidth. Almost all providers have limited bandwidth, so unless you’re willing to pay a lot, you’re better off using different kinds of proxies for activities like streaming or downloading larger files.

Q. How to choose the best package for my SIM card?

There isn’t a specific answer to this question because providers have different offerings, and not all of them are identical across multiple countries. We recommend going for a package based on what you’ll need the proxy for.

Some providers offer packages with unlimited bandwidth, so that’s a good starting point, especially if you plan on using more traffic. Double-check the usage policy because many have some limitations. If that option isn’t available, go for a provider and a SIM card that is within your budget while offering everything or most of what you’ll need.

Q. How much will it cost me to set up a mobile proxy server?

Like the previous question, there isn’t a specific answer. From everything you’ll be using, the Raspberry Pi and microSD card are a fixed price and a one-time payment. For the others, things are a bit different. Going back to the providers, you’ll need a USB modem and a SIM card for it.

These can come in a combo where you may need to pay a monthly fee. There are also contract-based SIM cards where you’ll pay for the traffic, but you’ll get the USB modem for free, which is included in the package. The price for this depends on the provider, so double-check before starting this process. As far as any payments for having the server running, there isn’t one. Apart from the negligible increase in your electric bill, there isn’t anything else that you’ll be paying.

Q. Can I use my mobile proxy server in a different location?

Yes. The good thing about this is that you already have the server set up, meaning you won’t need to go through the same process if you decide to take it to another location. You’ll only need to make sure the 3128 port is open wherever you plan on using it, and you’ll have no issues.

Q.  What speeds can my mobile proxy server offer?

This is another aspect that depends on the provider. There are two sides that can be the limiting factor. The first is your home or office connection, and the second is the speed at which the provider’s mobile IP addresses can achieve.

Whichever of these two is the lower, that’s the maximum speed you’ll be able to get. Keep in mind that this is theoretical. In the real world, there are multiple aspects that may slow things down, so you should have realistic expectations.


Conclusion

There are many options for mobile proxies, and today’s guide covers one of the best options for people looking to go the DIY route. The process is a bit tricky and takes some time, but as long as you follow our steps, you shouldn’t have any issues.

On the other hand, if you’re not a massive tinkering fan or are unsure if you can do this, there’s always Proxy Seller. This provider offers a product that allows you to set up the mobile proxy server within minutes, making it ideal for people who don’t want the hassle.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.