IPRoyal with Raspberry PI: passive income service by sharing internet bandwidth

4.2
(5)

Earning with your Raspberry PI running all the day for other services is possible by sharing your internet bandhwidth with service providers granting IP proxies to other customers for works like marketing researches and similar stuff. For your Raspberry PI, IProyal is one of most famous and established providers in this perspective

In this tutorial, I’m going to show you how to install IProyal in your Raspberry PI in a way that assures your privacy with the help of Docker.

What is IProyal

Basically, IProyal is a proxy service, with its company address in Canada. Their customers usually make use of this proxy service for uses as, for example:

  • Business intelligence
  • Search engine optimization
  • App testing
  • Content delivery
  • Brand protection
  • Ad verification
  • Market research

For this reason, they ask people to share their internet connection so that their services can cover more world parts and their customers can, for example, see how their products are shown with different eyes (your internet access).

IProyal average rates

The revenue for people sharing their bandwidth depends on the amount of traffic you share (in GB), how long you keep the application running and the market answer for having access from your country. However, the average rate is 0.20USD per 1GB shared. Your earnings can be transferred by Paypal (minimum payout amount: $5, with 0.25 USD fee), Bitcoin (minimum payout amount: $5, with 1.50 USD fee) and VISA (minimum payout amount: $5, with 0 USD fee). Earnings can be increased by using their affiliate program: for every person you invite, IProyal will share part of the company earnings with you without affecting the invited person’s earnings.

Surely it will not make you able to exit from your job, but it can give you enough money to buy a new Raspberry PI of cool sensors to try.

Privacy and Security Questions

For this kind of service, the main questions for people installing the internet sharing app concern security and privacy aspects. I’ve routed these questions to IProyal and these have been their answers:

Giuseppe’s question: Common questions from users has been regarding the security on people/company using my Raspberry PI, main one being:

– how can I rest assured that my connection/IP will never be used for illecit traffic?
– how can I rest assured that the connection will not scan/access in my local area network

IProyal answer: I completely understand the concern from your users, therefore we at IPRoyal take key steps to ensure that everything is done in a secure way so our users would feel safe earning money with IP Royal Pawns. 

Here’s a quick rundown of how we ensure the service is safe to use:

– All our clients need to confirm their identity by providing their name and valid documents, we carefully vet who is using your traffic.
– The app itself has no access to your storage and does not gather any personal data or scan networks.
– Our in-house team monitors the traffic rigorously.
– The IPRoyal network is used by businesses for research in e-commerce, marketing, and web intelligence. These companies gather insights from different corners of the web for market analysis, brand protection, ad-fraud prevention, pricing intelligence, travel transport aggregation, and SEO monitoring.

You can find more information about this in this article – Is the IPRoyal Pawns App Safe to Use?

So, there is a monitoring team working to make this business clear and legit.

In this guide, I will show you how to install IProyal client on Raspberry PI adding a privacy layer by using Docker: using docker containers enables you to get isolation from your Raspberry PI storage. Moreover, by setting iptables you can deny any king of traffic from this service to your local network, keeping the IProyal client working without any issue. If you don’t know your network topology and you trust the IProyal service, you can also skip the networking step (I will show you how to do it in the following chapters.

What We Need

Raspberry PI 4 model B image

As usual, I suggest adding from now to your favourite e-commerce shopping cart all needed hardware, so that at the end you will be able to evaluate overall costs and decide if continue with the project or remove them from the shopping cart. So, hardware will be only:

Check hardware prices with the following links:

Amazon raspberry pi boards box
Amazon Micro SD box
Amazon Raspberry PI Power Supply box

Step-by-Step Procedure

Register a new Account in IProyal

With a common browser, go to IProyal and signup to create a new account. Please note that your email and password used to register in IProyal will be needed in the following steps to correctly start the Raspberry PI client. So, keep them in a local notepad.

Prepare your Raspberry PI

Start installing your Raspberry PI OS. I suggest installing Raspberry PI OS Lite, as in this way you will have a performing OS able to provide your home with a huge number of enhanced services. You can also install Raspberry PI OS Desktop, in this case working from its internal terminal.

Make sure your OS is up to date. From the terminal, please issue the following command:

sudo apt update -y && sudo apt upgrade -y

Then install Docker in your Raspberry PI (use the previous link to get a detailed tutorial).

Get IProyal Installer Link

First of all, let’s check our running OS architecture. From the terminal, please use this command:

docker run -it --rm debian bash

If the Debian image is not still available, it will download the image and run a container in interactive mode (“-it” options), also removing the container when we’ll exit (“–rm” option”). The container is created and started to run the bash shell (“bash”). So, your shell will change to something similar to “root@1478ded6b4a0:/#” with a prompt. This means that you are working inside the new container. From here:

uname -m

This command will give you the architecture running in your Raspberry PI. For example, my Raspberry PI OS Lite (32-bit) give me the following result:

root@ec6b7252e3cd:/# uname -m
armv7l

So, “armv7l” is mine architecture. You can now exit from the container with the following command:

exit

Go to the following GitHub page: https://github.com/IPRoyal/pawns-cli/blob/main/readme.md. From here, in the “Download links” section, copy the link corresponding to your Raspberry PI architecture (it will be “Linux aarch64” or “Linux ARM v7l”) by right-clicking with the mouse and selecting “Copy link address”. Paste this link in your notepad.

At this point, you should have in your notepad the email and password used for IProyal registration and the installer link.

Prepare Docker Image for IProyal

To arrange our docker image (which you can think of as a sort of template) for IProyal, we’ll create a specific folder and a Dockerfile.

Create a new folder (I will use “IProyal” name for this folder, but it can be whatever you prefer) and enter it:

mkdir IProyal
cd IProyal

Create a new file (this must be named “Dockerfile”):

nano Dockerfile

Dockerfile Content for People Knowing Home Network Topology

If you know your local network, we’ll use the ufw (Uncomplicated FireWall) package to manage the container iptables and deny access to the local network. We’ll add an allow rule for our default gateway to the internet (usually the home router) and one (or more) deny rule to forbid access from the container to our home network(s). In the following template for the Dockerfile, you have to change the parts highlighted in red, by using in order:

  • Your default gateway to internet (home router IP address) -> in my case 192.168.1.1
  • Your local networks to close for container accer -> in my case 192.168.1.0/24. You can also add more networks to deny by adding here more “RUN echo “ufw deny out to x.x.x.0/24″>>fw_rules.sh” rows
  • The link referring to your architecture installer -> in my case https://download.iproyal.com/pawns-cli/latest/linux_armv7l/pawns-cli
  • Your email address and password used to register in IProyal -> in my case I used “your_email@example.com” and “your_password”

Please note that adding the allow rule for default gateway before the deny rule for network, it will work also when the router is in the network range as ufw uses the first rule matching the requests.

FROM debian
RUN apt update -y && apt install wget -y
RUN apt install ufw -y
RUN echo "ufw allow out to 192.168.1.1">fw_rules.sh
RUN echo "ufw deny out to 192.168.1.0/24">>fw_rules.sh
RUN wget https://download.iproyal.com/pawns-cli/latest/linux_armv7l/pawns-cli
RUN chmod u+x /pawns-cli
RUN chmod u+x /fw_rules.sh
CMD ufw enable && sh fw_rules.sh && /pawns-cli -email=your_email@example.com -password=your_password -device-name=raspberrypi -accept-tos

Save and close (CTRL+X, then answer yes). In this case, you can skip the following chapter and go directly to “Build the Docker Image” section.

Dockerfile Content for People NOT Knowing Home Network Topology

If you don’t know your network topology, you can use the following simplified Dockerfile:

FROM debian
RUN apt update -y && apt install wget -y
RUN wget https://download.iproyal.com/pawns-cli/latest/linux_armv7l/pawns-cli
RUN chmod u+x /pawns-cli
CMD /pawns-cli -email=your_email@example.com -password=your_password -device-name=raspberrypi -accept-tos

Also for this case, save and close (CTRL+X, then answer yes).

Build the Docker Image

In both cases, the next command will build the docker image (please don’t miss the ending point):

docker build -t iproyal_debian .

This will create a template by executing all the rows from our dockerfile and it will finish with a new docker image available. You can check it by issuing the “docker image ls” command:

pi@piServer:~ $ docker image ls
REPOSITORY       TAG       IMAGE ID       CREATED        SIZE
iproyal_debian   latest    946ae764a2ee   10 min ago     176MB

debian           latest    bf0f1861a3bd   4 weeks ago    100MB

Run IProyal Docker Image

We can run our IProyal service by using the following command line:

docker run -d --name IProyal --cap-add=NET_ADMIN --restart unless-stopped iproyal_debian

Please note, in the previous command, that the “–cap-add=NET_ADMIN” is required to execute the ufw inside the container. If you are using the Dockerfile without it, you can skip this option. Moreover, the “–restart unless-stopped” will make the container run also after a Raspberry PI reboot.

To check if the container is running, you can use the “docker ps -a” command:

pi@piServer:~ $ docker ps -a
CONTAINER ID   IMAGE              COMMAND                  CREATED        STATUS          PORTS     NAMES
2df805aa4a5f   iproyal_debian     "/bin/sh -c 'ufw ena…"   3 days ago     Up 50 minutes             IProyal

Moreover, you can check the container activity with the “docker logs IProyal”:

pi@piServer:~ $ docker logs IProyal
...
...
{"happened_at":"2022-02-27T14:31:55Z","name":"balance_ready","parameters":{"balance":"0.288 USD","traffic":"1.4421 GB"}}
{"happened_at":"2022-02-27T14:44:15Z","name":"balance_ready","parameters":{"balance":"0.288 USD","traffic":"1.4421 GB"}}
{"happened_at":"2022-02-27T14:48:56Z","name":"balance_ready","parameters":{"balance":"0.289 USD","traffic":"1.4452 GB"}}
{"happened_at":"2022-02-27T14:55:47Z","name":"balance_ready","parameters":{"balance":"0.290 USD","traffic":"1.4503 GB"}}

Finally, for those that used my Dockerfile with ufw, you can test the networking rules by accessing the container bash:

docker exec -it IProyal bash

Then install the ping tool inside the container:

apt install iputils-ping

and testing the ping for your local network addresses.

Removing and/or Deleting the IProyal Container

If, for somewhat reason, you want to remove the container, also here Docker is a great help as it allows you to remove the service leaving the Raspberry PI OS clean. You can remove the IProyal container by using the following commands:

docker stop IProyal
docker rm IProyal

You can also remove the template created before with the following command:

docker image rm iproyal_debian:latest

Next Steps

Interested in more RPI projects? Take a look at peppe8o Raspberry PI tutorials to discover a world of cool projects for your beloved computer board!

Enjoy!

How useful was this post?

Click on a star to rate it anonymously!

Average rating 4.2 / 5. Vote count: 5

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

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?