Reverse proxy – selection of services and setup instructions

chushpan

Professional
Messages
209
Reputation
1
Reaction score
205
Points
43
Step-by-step instructions on how to use a reverse proxy to hide a website’s IP address from ill-wishers and competitors – 2 free and 1 paid tool. It will be useful for protecting against unreasonable requests to the hoster or for hiding your advertising in spy services from IP searches.

Content
1. What is a reverse proxy and how does it differ from a direct one?
1.1. What to use it for
2. Setting up reverse proxy via CloudFlare
3. Setting up reverse proxy using a script from WYSINWYG
3.1. Installation and configuration
3.2. Adding domains
4. Setting up reverse proxy via PrivateFlare
4.1. Registration in PrivateFlare
4.2. Rates
4.3. Installation and configuration
4.4. Adding domains

What is a reverse proxy and how does it differ from a direct one?

Reverse proxy - sends server data to the user on its own behalf. When a user goes to a site, their request is first processed by the reverse proxy and then sent from the reverse proxy to the server. The server response is also first processed by the reverse proxy, and only then is it sent to the user.

image16-1.jpg


What to use it for​

For example, reverse proxy via CloudFlare reduces the load on the main server, protects against malicious requests, DDoS attacks and increases site security. In traffic arbitration, we can also highlight several reasons why it is worth hiding the IP address of the server on which your tracker, website, etc. is located.
  • Protection from unfounded appeals. Ill-wishers and competitors can complain to the hoster about the site using its IP address under a false pretext. This, in turn, can lead to blocking by the hoster and you will have to transfer the tracker to another server, re-upload landing pages, reconfigure the advertising campaign, etc.
  • Protection against DDoS attacks. Competitors can find out the IP address of the tracker and organize a DDoS attack on it.
  • Make it more difficult to find your creatives in spy services. In spy services, having found one of your creatives by the IP of the advertised domain, they can find all the rest of your advertising. CloudFlare is a good solution for this problem.

Setting up reverse proxy via CloudFlare

There are different services for setting up reverse proxy. CloudFlare is the most popular among them. The service is used not only by affiliate marketers, but also by large brands such as Google, Microsoft, Apple, OpenAI, Amazon.
To hide the server IP, you need to configure a reverse proxy via CloudFlare according to our detailed instructions: https://cpa.rip/services/domens-cloudflare-to-keitaro/
Once configured, the domain will display the IP address of the CloudFlare server, not the real one.

Screenshot-at-May-22-01-44-43-2.png


IMPORTANT: When you go to the site, a captcha from CloudFlare may open and because of this, some traffic may be lost.

image12-2.jpg


Setting up reverse proxy using a script from WYSINWYG​

As an alternative, you can consider masking the IP of the main web server or tracker through its own secondary server. A script from WYSINWYG, which runs on Nginx, can help with this. The plus is that it's free.

Installation and configuration​

We buy VPS with Ubuntu 22 or Debian operating system. The example also used Friendhosting and a VPS with the Debian 11 operating system.

image14-2.jpg


After 30 minutes, access should arrive by email:

image12-3.jpg


Open the Putty SSH client (for Windows) or Terminal (for macOS), in this case we will use Terminal.
We connect to the server using the command:
ssh ЛОГИН@IP-СЕРВЕРА -p ПОРТ
In the example:
ssh [email protected]**.*6.106 -p 3333

image4-3.jpg


Enter the password:

image7-3.jpg


And paste the code into the terminal, which is attached below and press Enter:
systemctl stop apache2; sudo apt-get update && \
sudo apt-get install -y curl git && \
curl -fsSL https://get.docker.com -o get-docker.sh && \
sudo sh ./get-docker. sh && \
git clone https://github.com/momentum100/reverse-proxy-ui && \
cd ./reverse-proxy-ui && \
sudo ./start. sh

Screenshot-at-May-24-16-09-04.jpg


After installing all the files and scripts, at the end there will be a link to your server and login password:

Screenshot-at-May-24-16-11-16.jpg


We go to the site and enter the password. Press Enter:

Screenshot-at-May-24-16-11-55.jpg


Adding domains​

Filling out the tabs:
  • Domains: insert a domain that is linked to the VPS via an A record.
  • Destination IP: specify the web server or tracker that we want to mask.
Click “Save domains”.

Screenshot-at-May-24-16-13-42-scaled.jpg


Next, click on the “Start config generation on new domains” button.

Screenshot-at-May-24-16-14-27-scaled.jpg


The SSL certificate should be issued (the domain and IP line should turn green).
Next, click “Restart web server”.

Screenshot-at-May-24-16-15-23-scaled.jpg


After this, the IP of the reverse proxy server will be determined by domain, but the site or tracker on the main server will be displayed .

image8-3.jpg


Setting up reverse proxy via PrivateFlare

Another option is the paid tool PrivateFlare, which also runs on Nginx.

Registration in PrivateFlare​

Go to the website https://www.privateflare.com and click “Sign in”.

image9-2.jpg


We fill out the registration fields, indicating the following information: name, login, email address, Telegram username and password.

image1-2.jpg


To activate your account, you will be contacted by the Telegram you specified during registration. You can also write to Telegram-Support yourself: https://t.me/privateflare

Rates​

The price of tariffs depends only on the number of active domains in the service, while the number of servers is not limited. *A free trial is also provided for 2 weeks to test the service.

image6-2.jpg


Installation and configuration​

PrivateFlare recommends choosing VPS with operating systems Rocky versions 8-9, CentOS versions 8-9 and Debian versions 10-11. The following system requirements are also recommended:
  • For individual work and low traffic (up to 1000 clicks per day), any option is suitable.
  • For small commands (from 1000 to 5000 transitions) a minimum of 2 GB of RAM is required.
  • To handle significant traffic, it is recommended to choose a VPS with a reserve of resources: at least 4 GB of RAM and 4 processor cores.
Any VPS on any virtualization is suitable for work. In the example, we used Friendhosting and a VPS with the Debian 11 operating system.

image14-2.jpg


After 30 minutes, access should arrive by email:

image12-3.jpg


Then open the Console (for Windows) or Terminal (for macOS), in this case we will use Terminal.
We connect to the server using the command:
ssh LOGIN@IP SERVER -p PORT
In the example:
ssh [email protected].**.*** -p 3333

image4-3.jpg


Enter the password:

u2vps.jpg


Go to the PrivateFlare control panel and select the “Nodes” section. In the “New node name” field, enter the desired name for the node and copy the command below.

image3-2.jpg


Paste the command into the terminal:

image10-2.jpg


Successful completion of the installation process looks like this:

image5-3.jpg


image2-2.jpg


Adding domains​

Go to the “Add domains” tab.
Fill in the fields for adding a domain as follows:
  • Set default backend IP: specify the web server or tracker that we want to mask.
  • Make free SSL certificates (if possible): leave enabled by default.
  • Force redirect to HTTPS: leave enabled by default.
  • Format {domain}:{backend ip}: insert a domain that is linked to the VPS via an A record.
Click “Add”.

image13-2.jpg


Go to the “Domains” tab and wait until the SSL certificate is issued (the icon should turn green).

image11-2.jpg


After this, the IP of the reverse proxy server will be determined by domain, but the site or tracker on the main server will be displayed .

image8-3.jpg



(c) https://cpa.rip/services/reverse-proxy/
 
Top