2

is there a way to geo block China from connecting my GCP VMs?

I see this item in my billing:

Network Internet Egress from Americas to China

Can I block the whole lot?

Is there a way to investigate what kind of IPs are connecting? (I know you can add logging rules to the GCP firewall but I am fuzzy on the details)..

If none of the above possible - is there a public list of rules for Linux firewalls (CentOS 8) to block IPs by countries?

Boppity Bop
  • 752
  • 3
  • 11
  • 34

2 Answers2

1

You can use Cloud Armor Network Security ($$$), or opt to download all the IP addresses/rages for China (using a country IP database range provider (many on the internet)) and deny all the source IP ranges using a GCP VPC firewall rule or policy (FREE). Both options are very simple to do.