Access permission to senhasegura through the Google Cloud Platform integrated balancer

How to configure to allow access to senhasegura through the Google Cloud Platform balancer

1. First, the subinterface must be created using the command below:

vim /etc/network/interfaces.d/eth0:1

2. After creating the subinterface, it will be necessary to create its properties, for that use the following command:

auto eth0:1
iface eth0:1 inet static
    address <VIP_IP_ADDRESS>
    netmask 255.255.255.255
    pre-up arptables -t filter -F INPUT
    pre-up arptables -t filter -F OUTPUT
    pre-up arptables -t filter -A INPUT -d <VIP_IP_ADDRESS> -j DROP
    post-up arptables -t filter -A OUTPUT -s <VIP_IP_ADDRESS> -j mangle --mangle-ip-s <IP_DA_ETH0_DO_SERVIDOR>

In <VIP_IP_ADDRESS> insert the Google Cloud Platform Balancer IP parameters, and in <IP_DA_ETH0_DO_SERVITOR> insert senhasegura IP, as shown in the image below.

3. After inserting the IP and VIP parameters, the network subinterface must be enabled using the command below:

ifup eth0:1

4. Then validate the IP using the following command:

ip a