If you need to create firewall rules related to Google Load Balancer: You must create a firewall rule that allows traffic from 220.127.116.11/22 and 18.104.22.168/16 to reach your instances. This rule allows traffic from both the load balancer and the health checker. The rule must allow traffic on the port your global forwarding rule has […]
You can create an Instance Template out of disk snapshot like this: 1) Created an instance 2) Install the required services on that instance 3) Create the image from the disk using the steps mentioned on this link. 4) With that Image create a new template. Other simpler steps recommended by an user: 1) Create […]
Google Cloud Load Balancer saves the user’s IP in the X-Forwarded-For field: X-Forwarded-For: -client IP(s)-, -global forwarding rule external IP-X-Forwarded-For: -client IP(s)-, -global forwarding rule external IP- More information can be found here: https://cloud.google.com/load-balancing/docs/https/ Here is a sample PHP snippet to get the user’s IP address: $user_ip = explode(",", $_SERVER[‘HTTP_X_FORWARDED_FOR’]); print_r($user_ip);$user_ip = explode(",", $_SERVER[‘HTTP_X_FORWARDED_FOR’]); print_r($user_ip);
To connect as root with your Compute Engine VM using WinSCP do this: Option 1: Using Session -> File Protocol -> SCP sudo su -sudo su – Option 2: Using Session -> File Protocol -> SFTP sudo -s /usr/lib/sftp-serversudo -s /usr/lib/sftp-server
You can become root via “sudo su”. No password is required.
First you need to create an SSH key (use PuTTyGen.exe). Then on Google Cloud click on Compute Engine -> Metadata -> SSH Keys. Add there your generate SSH key and click on “Save” button. Then open PuTTy and in “Host Name” field enter: [username]@[external_IP][username]@[external_IP] Where username will be the same as the one used to […]