DEV Community

nabbisen
nabbisen

Posted on • Edited on

GCE VM Firewall Cofiguration

Introduction

Google provides GCE, Google Compute Cloud, as IaaS product of GCP, Google Cloud Platform.

GCE enables us to use just two numbers as server ports by default, 80 as http and 443 as https.
It's enough to build simple web servers, but not to build more.

I had to build a ftp server instantly.
Therefore, I tried custom configuration of GCP firewall.

Summary

There are just two steps to carry it out:

  • Step 1: Setting Up VPC Network
  • Step 2: Configuring VM Instances Of GCE
✿ ✿ ✿

Procedure

Step 1: Setting Up VPC Network

Choose [VPC network] - [Firewall rules]:

Click "CREATE FIREWALL RULES":


In my case, tcp 21 was set as ftp port.

Naming

Rule name:

screenshot

Tag name:

screenshot

This "Tag name" will be used at setting up GCE VM instances.

Network rules

Ingress or Egress:

screenshot

Ingress is enough to achieve my purpose.

IP ranges:

screenshot

Protocols and ports:

screenshot


Execute "Create":

screenshot

Result:

screenshot

The first row is added.

Step 2: Configuring VM Instances Of GCE

Case 2-1: Editing Existing VM

Start editing:

screenshot

screenshot

screenshot

Add "Network tags" using "Tag name":

screenshot

Save:

screenshot

screenshot

Finished ☺

Case 2-2: Configuring At Creating VM

Add "Network tags" using "Tag name":

screenshot

Finished ☺

✿ ✿ ✿

Happy serving 🕊

Top comments (0)