- ん、こけるはずないのにってとき
やること
- firewallの
130.211.0.0/16
をallowになってるか確認してみてください- allowにすると動くかも
なんで
- GCEのfirewallを解放してLB -> GCEのヘルスチェックのアクセスログを見てみる
- - - [16/Feb/2017:09:51:48 +0000] "GET /g/system HTTP/1.1" 200 1299 "-""GoogleHC/1.0" "130.211.1.99" "auth:-"
- - - [16/Feb/2017:09:51:50 +0000] "GET /g/system HTTP/1.1" 200 1299 "-""GoogleHC/1.0" "130.211.1.104" "auth:-"
- - - [16/Feb/2017:09:51:50 +0000] "GET /g/system HTTP/1.1" 200 1299 "-""GoogleHC/1.0" "130.211.1.96" "auth:-"
-
130.211.1.xxx
みたいのからアクセスきてる - 調べてみるとGCPのドメインみたい
~ % whois 130.211.1.99
# 略
NetRange: 130.211.0.0 - 130.211.255.255
CIDR: 130.211.0.0/16
NetName: GOOGLE-CLOUD
- とりあえず、あけたら動いただった
- セキュリティ的に大丈夫なのかはよくわからない。。
- ケチって
130.211.1.0/24
とかやると、アクセスできないリクエストとかたまにあるからきっちり130.211.0.0/16
で開けた方がいいかも
追記 (2017/2/17)
- 公式docsによると
130.211.0.0/22
と35.191.0.0/16
を開けておくといいみたいです - https://cloud.google.com/compute/docs/load-balancing/http/
In addition, you must create a firewall rule that allows traffic from 130.211.0.0/22 and and 35.191.0.0/16 to reach your instances. This rule allows traffic from both the load balancer and the health checker. The rule should enable traffic on the port your global forwarding rule has been configured to use, and your health checker should be configured to use the same port.
https://cloud.google.com/compute/docs/load-balancing/http/