fortinet / fortigate-tutorial-gcp

6 stars 12 forks source link

PR: Add 0.0.0.0/0 incoming rule to handle IPV6 environments #8

Open obriensystems opened 7 months ago

obriensystems commented 7 months ago

In some clients - "what is my ip" will return an IPV6 address instead of a IPV4 address The fix for this is to ignore the lookup of your /32 ip and just open it to 0.0.0.0/0 without the fix - we hang on admin access

change

in https://github.com/fortinet/fortigate-tutorial-gcp/blob/main/terraform/day0/main.tf#L9

 data "http" "my_ip" {
   url             = "http://api.ipify.org"
 }

 # Create base deployment of FortiGate HA cluster
@@ -16,8 +17,10 @@ module "fortigates" {
   region          = var.GCE_REGION
   service_account = data.google_service_account.fgt.email != null ? data.google_service_account.fgt.email : ""
-  admin_acl       = ["${data.http.my_ip.body}/32"]
-  api_acl         = ["${data.http.my_ip.body}/32"]
+ # admin_acl       = ["${data.http.my_ip.body}/32"]
+  admin_acl       = ["0.0.0.0/0"]
+ # api_acl         = ["${data.http.my_ip.body}/32"]
+  api_acl         = ["0.0.0.0/0"]
Screenshot 2024-03-03 at 19 07 18