Skip to main content

How to configure IAP in GCP

 Create a firewall rule To allow IAP to connect to your VM instances, 

create a firewall rule that: applies to all VM instances that you want to be accessible by using IAP. allows ingress traffic from the IP range 35.235.240.0/20. 

This range contains all IP addresses that IAP uses for TCP forwarding. allows connections to all ports that you want to be accessible by using IAP TCP forwarding, for example, port 22 for SSH and port 3389 for RDP.


Command:


Firewall for IAP

gcloud compute firewall-rules create allow-rdp-ingress-from-iap \
  --direction=INGRESS \
  --action=allow \
  --rules=tcp:3389 \
  --source-ranges=35.235.240.0/20


Tunnel Command

gcloud compute start-iap-tunnel INSTANCE_NAME 3389 \
    --local-host-port=localhost:
LOCAL_PORT \
    --zone=
ZONE


gcloud compute start-iap-tunnel nshcloudlabs-instance-group-1-9v0v 3389 --local-host-port=localhost:3389 --zone=us-central1-a     


Permissions for user:

roles/iap.tunnelResourceAccessor




References:

https://cloud.google.com/iap/docs/using-tcp-forwarding





Comments

Popular posts from this blog

Soal dan pembahasan LKSN ITNSA

Berikut adalah koleksi soal-soal ITNSA dan beberapa website yang memberikan pembahasan pada event perlombaaan LKS SMK Nasional bidang lomba IT Network Systems Administration. 2014 Palembang Di tahun ini ada 1 soal packet tracer. Di website dibawah ini diberikan juga cara pembahasannya. https://agussas.wordpress.com/2015/04/02/review-soal-lks-nasional-it-network-23-packet-tracer-challenge/ Semua soal:  https://www.dropbox.com/sh/l90zyke2ib5msgv/AAA3kPOFo-zEn4wPOW4a3iMwa?dl=0 dan https://drive.google.com/file/d/18lDhtMjAnPAhkfOJ6uFHsC5j6ycg3K4I/view Pembahasan juga dalam bentuk video di youtube:  https://www.youtube.com/watch?v=8QML594nQBU 2015 Banten Pembahasan:   https://www.youtube.com/watch?v=quDbpC2xSfQ Soal:  https://drive.google.com/file/d/1B09IYfdoGENBL3txSQodpptG1zdQxBWI/view 2016 Malang Soal:   https://drive.google.com/file/d/13-2bRtb5IXO9vxAhLfhghZbDXeUzD0FI/view Pembahasan:   https://www.youtube.com/watch?v=zmUSUZguH24 20...

Dasar instalasi dan konfigurasi OpenLDAP

 ### Panduan Instalasi OpenLDAP Berikut adalah panduan sederhana untuk menginstal dan mengkonfigurasi OpenLDAP pada server dengan domain `bagussa.my.id` dan IP `10.10.10.1`.  #### 1. Instalasi OpenLDAP Pertama, instal OpenLDAP beserta paket-paket yang diperlukan: ```bash sudo apt update sudo apt install slapd ldap-utils ``` Selama instalasi, Anda mungkin akan diminta untuk memasukkan kata sandi untuk `admin` LDAP. Simpan kata sandi ini dengan aman. #### 2. Konfigurasi Manual di `/etc/hosts` Tambahkan entri untuk domain dan IP di file `/etc/hosts`: ```bash sudo nano /etc/hosts ``` Tambahkan baris berikut: ``` 10.10.10.1    bagussa.my.id ``` Simpan dan keluar dari editor. #### 3. Konfigurasi `/etc/ldap/ldap.conf` Edit file konfigurasi LDAP: ```bash sudo nano /etc/ldap/ldap.conf ``` Tambahkan atau modifikasi baris berikut: ``` BASE    dc=bagussa,dc=my,dc=id URI     ldap://10.10.10.1 ``` Simpan dan keluar dari editor. #### 4. Buat OU dan Group de...

Soal dan pembahasan LKS ITNSA Network Infrastructure Basic

Soal tahun 2021 tingkat Nasional Soal bisa di download di https://itnsa.id Basic Configuration Configure IP Address of all network devices according to the addressing table.  Create SSH user ‘patah’ with password specified in the appendix.  Make sure the user are able to enter configuration commands in the router.  Allow server admins to SSH to all network devices.  If you need to set additional password on the Routers, use Skills39 Look at the appendix table and configure accordingly Configure IP address: csr1000v# configure terminal #change interface name according to the topology csr1000v (config)# interface GigabitEthernet0 csr1000v (config-if)# ip address  x.x.x.x y.y.y.y csr1000v (config-if)# no shutdown Create SSH user: csr1000v# configure terminal csr1000v (config) # username patah password cisco123 csr1000v (config)# privilege 15 patah Allow server admins to SSH: csr1000v# configure terminal csr1000v (config)# ip access-list standard SSH_ACL csr10...