DevOps
  • Introduction
  • Setting
    • Terminal
      • Tmux
    • WSL+Ubuntu
    • [NeoVIM]
      • install & 활용방법
      • error 처리
      • LazyVIM
        • install & 활용방법
    • ssh
    • mysql
    • package관리
  • Fundamental(basic)
    • Network
      • https
  • [GitOps]
    • [SCM]
      • [Github]
        • center-managed
      • bitbucket
      • AWS-codeCommit
  • roadmap
    • devops
    • kubernetes
    • AWS
    • MLOPS
  • Cloud
    • [AWS]
      • aws sso script
      • tagging 자동화
      • 동일cidr에서 VPC 연결
      • 무중단서비스를 위한 고려사항
    • [GCP]
      • [GCP] GCP의 VPC
      • [GCP] GCP의 ALB
      • [GCP] OIDC와 OAUTH를 활용한 github action
      • [GCP] Composer 설명
      • [GCP] gmail-api
      • [GCP] DataLake
      • [GCP] Cloud 관리형 계정&role
      • [[GCP] private환경
        • DNS 설정으로 google api 및 colab-notebook 사용 하기
        • intelligence 설정으로 google api 및 colab-notebook 사용 하기
  • [kubernetes]
    • [cloud 기반]
      • csr
  • InfraAsCode
    • terraform
  • 코드로 그리는 다이어그램
    • CodeAsDiagram
      • example
    • Mermaid
    • PDFtoImage
  • AutoMation
  • [ETC]
    • Magic_Trackpad Window설치
Powered by GitBook
On this page
  • 적용 전 0.0.0.0/0 deny 적용
  • 방화벽 설정
  • 적용 후
  • curl 테스트
  1. Cloud
  2. [GCP]
  3. [[GCP] private환경

intelligence 설정으로 google api 및 colab-notebook 사용 하기

PreviousDNS 설정으로 google api 및 colab-notebook 사용 하기Next[kubernetes]

Last updated 6 months ago

보안 강도가 높은 사이트에서는 egress 정책이 제한 되어 있어, 모든 나가는 트래픽을 막을 시 gcp에서 꼭 필요한 google/gcp api 들이 endpoint까지 도달하지 못하고 차단 될것 이다.

이 경우 해결방법은 두가지가 있다.

  1. 방화벽 white list선택(인텔리전스) --> 추천

  2. DNS를 활용한 colab , google api 등록

본 문서는 인텔리전스 방식을 활용 하는 방법에 대해서 작성 하였으며 실제로 이 방법을 추천하는 이유는

  1. 설정 방법이 매우 간단 하다.

  2. 그럴리는 없겠지만 혹시라도 IP 대역이 변경이 될 경우 저 화이트리스트에 반영이 되기 때문에 정책이 유동적으로 반영 되리라 예상한다.

  3. DNS를 건드릴 일이 없기 때문에 DNS가 깔끔해진다.

  4. 설정이 직관적이라 방화벽 정책만 보면 된다.(본인도 실제로 DNS 방식을 처음 봤을때는 이런게 왜 있는거지 의문을 가졌다.)

적용 전 0.0.0.0/0 deny 적용

  • 위 그림을 보면 빨간색 부분은 0.0.0.0/0 egress deny를 건 시점 부터 발생 하였다.

  • 방화벽 로그도 deny로 확인 된다.

방화벽 설정

적용 후

allow로 걸리고 있는것을 확인 가능 하다.

curl 테스트

404가 나오긴 하지만 상관없다. 연결은 되고 있다는 것만 알면 된다.

kimutae5@kth-private:~$ curl -v a.aiplatform-notebook.cloud.google.com 
*   Trying 172.217.161.206:80...
* Connected to a.aiplatform-notebook.cloud.google.com (172.217.161.206) port 80 (#0)
> GET / HTTP/1.1
> Host: a.aiplatform-notebook.cloud.google.com
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Content-Type: text/html; charset=UTF-8
< Referrer-Policy: no-referrer
< Content-Length: 1561
< Date: Tue, 17 Dec 2024 04:04:58 GMT
< 
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/</code> was not found on this server.  <ins>That’s all we know.</ins>
* Connection #0 to host a.aiplatform-notebook.cloud.google.com left intact

kimutae5@kth-private:~$ curl a.composer.googleusercontent.com
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/</code> was not found on this server.  <ins>That’s all we know.</ins>
alt text
alt text
alt text
alt text
alt text