AWS VPC ์ด์ •๋ฆฌ

๋ธ”๋กœ๊ทธ ์˜ฎ๊ฒผ์Šต๋‹ˆ๋‹ค! ๐Ÿก’ integer.blog

AWS Certified Solutions Architect - Associate 2018 ๊ฐ•์˜๋ฅผ ๋“ฃ๊ณ  ๋‚ด์šฉ ์ •๋ฆฌ

VPC Diagram

1. What is a VPC ?

VPC๋Š” ํด๋ผ์šฐ๋“œ ๋‚ด์˜ ๊ฐ€์ƒ ๋ฐ์ดํ„ฐ ์„ผํ„ฐ.

2. What can you do with a VPC ?

  • ๋‚ด๊ฐ€ ์„ ํƒํ•œ ์„œ๋ธŒ๋„ท์— ์ธ์Šคํ„ด์Šค๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ๊ฐ๊ฐ์˜ ์„œ๋ธŒ๋„ท์— ์ปค์Šคํ…€ IP์ฃผ์†Œ ๋ฒ”์œ„๋ฅผ ํ• ๋‹นํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ์„œ๋ธŒ๋„ท ๊ฐ„์˜ Route tables๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.
    • Route Tables : ์–ด๋–ค ์„œ๋ธŒ๋„ท์ด ๋‹ค๋ฅธ ์„œ๋ธŒ๋„ท๋“ค๊ณผ speak ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์ •ํ•ด๋†“์€ ๊ฒƒ.
  • ์ธํ„ฐ๋„ท ๊ฒŒ์ดํŠธ์›จ์ด๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ์šฐ๋ฆฌ์˜ VPC์— ๋ถ™์ผ ์ˆ˜ ์žˆ๋‹ค.
  • AWS ์ž์›๋“ค์„ ๋”์šฑ ์•ˆ์ „ํ•˜๊ฒŒ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.
    • ์„œ๋ธŒ๋„ท ์‚ฌ์šฉ, ํŠน์ • IP์ฃผ์†Œ ๋ง‰๊ธฐ, ๋„คํŠธ์›Œํฌ ACLS ๋“ฑ์„ ํ†ตํ•ด์„œ.
  • ์ธ์Šคํ„ด์Šค ๋ณด์•ˆ๊ทธ๋ฃน
  • ์„œ๋ธŒ๋„ท ๋„คํŠธ์›Œํฌ ์ ‘๊ทผ ๊ด€๋ฆฌ ๋ฆฌ์ŠคํŠธ(ACLS)

3. Default VPC vs Custom VPC

Default VPC

  • ์‚ฌ์šฉํ•˜๊ธฐ ์‰ฝ๊ณ , ์ธ์Šคํ„ด์Šค๋ฅผ ์ฆ‰์‹œ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๊ฒŒํ•œ๋‹ค.
  • Default VPC์˜ ๋ชจ๋“  ์„œ๋ธŒ๋„ท๋“ค์€ ์ธํ„ฐ๋„ท์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ํ”„๋ผ์ด๋น— ์„œ๋ธŒ๋„ท์ด ์—†๋‹ค.
  • ๊ฐ๊ฐ์˜ EC2 ์ธ์Šคํ„ด์Šค๋Š” ํผ๋ธ”๋ฆญ IP์™€ ํ”„๋ผ์ด๋น—IP๋ฅผ ๋ชจ๋‘ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค

Custom VPC

  • ํ”„๋ผ์ด๋น— ์„œ๋ธŒ๋„ท์ด ์žˆ๋‹ค.
  • ๊ฐ๊ฐ์˜ EC2 ์ธ์Šคํ„ด์Šค๋Š” ํ”„๋ผ์ด๋น— IP๋งŒ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค.

4. VPC Peering

  • ํ”„๋ผ์ด๋น— IP์ฃผ์†Œ๋“ค์„ ์ด์šฉํ•ด์„œ VPC ๋ผ๋ฆฌ ๋‹ค์ด๋ ‰ํŠธ ๋„คํŠธ์›Œํฌ ๋ฃจํŠธ๋กœ ์—ฐ๊ฒฐํ•œ๋‹ค.
  • ์ธ์Šคํ„ด์Šค๋“ค์€ ๊ฐ™์€ ํ”„๋ผ์ด๋น— ๋„คํŠธ์›Œํฌ์— ์žˆ๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์—ฌ๊ฒจ์ง„๋‹ค.
  • ๋‹ค๋ฅธ AWS ๊ณ„์ •์˜ VPC์™€๋„ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ๊ณ , ๊ฐ™์€ ๊ณ„์ •์˜ VPC์™€๋„ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ๋‹ค.
  • VPC A์™€ B, A์™€ C๊ฐ€ ์—ฐ๊ฒฐ๋˜์–ด์žˆ์–ด๋„ B์™€ C๊ฐ€ ์—ฐ๊ฒฐ๋˜์–ด์žˆ์ง€ ์•Š์œผ๋ฉด ์—ฐ๊ฒฐ๋˜์ง€ ์•Š๋Š”๋‹ค. (we don’t have transitive peering in VPC)

5. Summary

  • VPC๋Š” AWS ๋‚ด์˜ ๋…ผ๋ฆฌ์  ๋ฐ์ดํ„ฐ์„ผํ„ฐ๋ผ ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค.
  • ๊ตฌ์„ฑ
    • Internet Gateways ๋˜๋Š” Virtual Private Gateways
    • Route Tables
    • Network Acess Control Lists
    • Subnets
    • Security Groups
  • 1 Subnet = 1 Availability Zone
  • Security Groups๋Š” Stateful ํ•˜๋‹ค.(๋„คํŠธ์›Œํฌ ์—ฐ๊ฒฐ ์ƒํƒœ๋ฅผ ์ถ”์ ํ•  ์ˆ˜ ์žˆ๋‹ค.)
  • Network Access Control Lists๋Š” Stateless ํ•˜๋‹ค.
  • NO TRANSITIVE PEERING

VPC ์‹ค์Šต 1

1. VPC ๋งŒ๋“ค๊ธฐ

  • Your VPCs ๋กœ ์ด๋™
  • Create VPC
  • Name tag ๋ฐ IPv4 CIDR block ์„ค์ • (๊ฐ€์žฅ ํฐ ๋ฒ”์œ„๋Š” 10.0.0.0/16)
  • IPv6 CIDR block = Amazon provided IPv6 CIDR block ์œผ๋กœ ์„ค์ •ํ•ด์•ผ ๋‚˜์ค‘์— ๋” ๋งŽ์€ ์˜ต์…˜์ด ์ƒ๊ธด๋‹ค.
  • Tenancy ์„ ํƒ
    • Default: ๋‹ค๋ฅธ ๊ณ ๊ฐ๊ณผ ํ•˜๋“œ์›จ์–ด๋ฅผ ๊ณต์œ ํ•œ๋‹ค.(Multi tenant environment)
    • Dedicate: ๋…๋ฆฝ๋œ ํ•˜๋“œ์›จ์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฏ€๋กœ ๋” ๋น„์‹ธ๋‹ค.

2. ํ˜„์žฌ๊นŒ์ง€ ์ƒํƒœ

3. Subnet ๋งŒ๋“ค๊ธฐ

  • Subnets๋กœ ์ด๋™
  • Create Subnets
  • VPC ์„ ํƒ
  • Name tag ์„ค์ •(๊ฐ•์‚ฌ๋Š” CIDR block range์™€ AZ์„ ๋‚˜ํƒ€๋‚ด๊ธฐ์œ„ํ•ด 10.0.1.0 - us-east-1a ๋ผ๊ณ  ์„ค์ •ํ•œ๋‹ค.)
  • Availability Zone ์„ค์ • (us-east-1a)
  • IPv4 CIDR block ์„ค์ • (10.0.1.0/24)
  • IPv6 CIDR block ์„ ํƒ (๊ฐ•์‚ฌ๋Š” ์•ˆํ•จ)
  • Yes, Create ํด๋ฆญ

4. ๊ฐ ์„œ๋ธŒ๋„ท CIDR ๋ธ”๋ก์—์„œ ์ฒซ 4๊ฐœ์˜ IP ์ฃผ์†Œ์™€ ๋งˆ์ง€๋ง‰ IP ์ฃผ์†Œ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์œผ๋ฏ€๋กœ ์ธ์Šคํ„ด์Šค์— ํ• ๋‹นํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด 10.0.0.0/24 CIDR ๋ธ”๋ก์˜ ์„œ๋ธŒ๋„ท์—์„œ๋Š” ๋‹ค์Œ 5๊ฐœ IP ์ฃผ์†Œ๊ฐ€ ์˜ˆ์•ฝ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

  • 10.0.0.0: ๋„คํŠธ์›Œํฌ ์ฃผ์†Œ.
  • 10.0.0.1: AWS์—์„œ VPC ๋ผ์šฐํ„ฐ์šฉ์œผ๋กœ ์˜ˆ์•ฝํ•œ ์ฃผ์†Œ.
  • 10.0.0.2: AWS์—์„œ ์˜ˆ์•ฝํ•œ ์ฃผ์†Œ. DNS ์„œ๋ฒ„์˜ IP ์ฃผ์†Œ๋Š” ํ•ญ์ƒ VPC ๋„คํŠธ์›Œํฌ ๋ฒ”์œ„๋ฅผ ๊ธฐ์ดˆ๋กœ 2๋ฅผ ๋”ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์—์„œ๋Š” ๊ฐ ์„œ๋ธŒ๋„ท ๋ฒ”์œ„๋ฅผ ๊ธฐ์ดˆ๋กœ 2๋ฅผ ๋”ํ•œ ๊ฒƒ๋„ ์˜ˆ์•ฝํ•ฉ๋‹ˆ๋‹ค. CIDR ๋ธ”๋ก์ด ์—ฌ๋Ÿฌ ๊ฐœ์ธ VPC์˜ ๊ฒฝ์šฐ, DNS ์„œ๋ฒ„์˜ IP ์ฃผ์†Œ๊ฐ€ ๊ธฐ๋ณธ CIDR์— ์œ„์น˜ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ Amazon DNS ์„œ๋ฒ„ ๋‹จ์›์„ ์ฐธ์กฐํ•˜์‹ญ์‹œ์˜ค.
  • 10.0.0.3: AWS์—์„œ ์•ž์œผ๋กœ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ์˜ˆ์•ฝํ•œ ์ฃผ์†Œ.
  • 10.0.0.255: ๋„คํŠธ์›Œํฌ ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ ์ฃผ์†Œ. VPC์—์„œ๋Š” ๋ธŒ๋กœ๋“œ์บ์ŠคํŠธ๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ, ์ด ์ฃผ์†Œ๋ฅผ ์˜ˆ์•ฝํ•ฉ๋‹ˆ๋‹ค.

5. ๋‘๋ฒˆ์งธ Subnet ๋งŒ๋“ค๊ธฐ

  • IPv4 CIDR block ์„ค์ • (10.0.2.0/24)
  • AZ ์„ค์ • (us-east-1b)

6. ํ˜„์žฌ๊นŒ์ง€ ์ƒํƒœ

7. Internet Gateway ๋งŒ๋“ค๊ธฐ

  • Create Internet Gateway
  • Name tag ์„ค์ • (๊ฐ•์˜์—์„œ๋Š” MyIGW) ๋ฐ Create
  • Attach to VPC
  • VPC ์„ ํƒ ํ›„ Yes, Attach
  • ํ•˜๋‚˜์˜ Internet Gateway๋Š” ํ•˜๋‚˜์˜ VPC ์—๋งŒ ๋ถ™์ผ ์ˆ˜ ์žˆ๋‹ค.

8. Route Table ๋งŒ๋“ค๊ธฐ

  • ์ƒˆ๋กœ์šด ์„œ๋ธŒ๋„ท์„ ๋งŒ๋“ค๋ฉด default๋กœ main route table์— ์—ฐ๊ฒฐ๋œ๋‹ค. ํ•˜์ง€๋งŒ ๋งค๋ฒˆ ์„œ๋ธŒ๋„ท์„ provisioning ํ•  ๋•Œ๋งˆ๋‹ค main route table์ด ์ธํ„ฐ๋„ท Accessableํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ƒˆ๋กœ์šด route table์„ ๋งŒ๋“ ๋‹ค.
  • Create Route Table
  • Name tag (๊ฐ•์˜์—์„œ๋Š” MyInternetRouteOut) ๋ฐ VPC ์„ค์ •
  • Yes, Create

9. Route Table์˜ ์ธํ„ฐ๋„ท ์—ฐ๊ฒฐ ์„ค์ •ํ•˜๊ธฐ

  • ์ƒˆ๋กœ ์ƒ์„ฑํ•œ Route Table ์„ ํƒ
  • ๋ฐ‘์˜ Routes ์„ ํƒํ•˜๊ณ  Edit ํด๋ฆญ
  • Add another route (0.0.0.0/0 , target = ์ข€์ „์— ์ƒ์„ฑํ•œ Interent Gateway)
  • Save
  • Add another route (::/0 , target = ์œ„์™€ ๋™์ผ) ๋กœ IPv6๋„ ์„ค์ •ํ•ด์ค€๋‹ค.
  • ์ด์ œ ์ด route์— ์—ฐ๊ฒฐ๋˜๋Š” ๋ชจ๋“  ์„œ๋ธŒ๋„ท์€ Public ์„œ๋ธŒ๋„ท์ด ๋œ๋‹ค.

10. Subnet์„ Route Table๊ณผ ์—ฐ๊ฒฐํ•˜๊ธฐ

  • Route Tables -> ๋ฐ‘์— Subnet Associations ํด๋ฆญ
  • Edit
  • Public Subnet์œผ๋กœ ์‚ฌ์šฉํ•  ์„œ๋ธŒ๋„ท(10.0.1.0)์„ ์„ ํƒํ•˜๊ณ  Save. (๋‚˜๋จธ์ง€ ํ•œ ์„œ๋ธŒ๋„ท์€ Private์ด ๋œ๋‹ค.)
  • Subnets๋กœ ๊ฐ€์„œ ์˜ค๋ฅธ์ชฝ ๋๋ถ€๋ถ„์— Auto-assign Public IP์„ ํ™•์ธํ•˜๋ฉด ์ƒˆ๋กœ ์ถ”๊ฐ€ํ•œ ์„œ๋ธŒ๋„ท๋“ค์€ No๋กœ ๋˜์–ด์žˆ๋‹ค.
  • Public Subnet์œผ๋กœ ์‚ฌ์šฉํ•  ์„œ๋ธŒ๋„ท์„ ์„ ํƒํ•˜๊ณ 
  • Subnet Actions -> Modify auto-assign IP settings -> Enable auto-assign public IPv4 address ์ฒดํฌ
  • Save

11. Public ์„œ๋ธŒ๋„ท์„ ์œ„ํ•œ EC2 ์ƒ์„ฑ

  • EC2๋กœ ์ด๋™
  • Launch Instance ํด๋ฆญ
  • Amazon Linux AMI ํด๋ฆญ
  • Network๋ฅผ Default VPC์—์„œ Custom VPC๋กœ ๋ณ€๊ฒฝ
  • Subnet ์„ ํƒ (10.0.1.0)
  • next next
  • Add tag ( Name / WebServer01)
  • next
  • Security group ์ƒ์„ฑ (๊ฐ•์˜์—์„œ๋Š” Web-DMZ)
    • SSH / 22 / 0.0.0.0/0
    • HTTP / 80 / 0.0.0.0/0, ::/0
  • Keypair ์„ ํƒ ํ›„ ์‹œ์ž‘

12. Private ์„œ๋ธŒ๋„ท์„ ์œ„ํ•œ EC2 ์ƒ์„ฑ

  • Subnet ์„ ํƒ (10.0.2.0)
  • Add tag ( Name / MyPrivateServer )
  • Security ๊ทธ๋ฃน์€ default๋กœ
  • Keypair๋Š” ์œ„์—๊บผ๋ž‘ ๊ฐ™์€ ๊ฒƒ

13. ssh๋กœ ์ ‘์†

14. ํ˜„์žฌ๊นŒ์ง€ ์ƒํƒœ

15. ์ดํ›„์— ํ•ด์•ผํ•  ๊ฒƒ

  • ๋‘ ๊ฐœ์˜ ๋ณด์•ˆ๊ทธ๋ฃน์€ ๊ฐ๊ฐ Public ๊ณผ Default๊ณ ,
  • ๋‘ ๊ฐœ์˜ ์„œ๋ธŒ๋„ท์€ ๊ฐ๊ฐ Public๊ณผ Private ์ด๋‹ค.
  • ๊ทธ๋ž˜์„œ ๋‘ ๊ฐœ์˜ ์ธ์Šคํ„ด์Šค๋Š” ์„œ๋กœ ๋‹ค๋ฅธ ๋ณด์•ˆ๊ทธ๋ฃน๊ณผ AZ ๋•Œ๋ฌธ์— ์„œ๋กœ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†๋Š” ์ƒํƒœ์ด๋‹ค.
  • ๊ทธ๋Ÿฌ๋ฏ€๋กœ ์ดํ›„์—๋Š” ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ๋„๋ก.

VPC ์‹ค์Šต 2

์‹ค์Šต 1์— ์ด์–ด Public ์„œ๋ธŒ๋„ท์„ ํ†ตํ•ด Private ์„œ๋ธŒ๋„ท์— ์ ‘์†ํ•˜๋„๋ก ํ•˜๋Š” ๊ฒƒ์ด ํ•ต์‹ฌ

1. ์ธ์Šคํ„ด์Šค๋ช… ๋ฐ ๋ณด์•ˆ๊ทธ๋ฃน ์ˆ˜์ •

  • MyPrivateServer -> MyMySQL
  • Security group ์ƒ์„ฑ
    • ๊ทธ๋ฃน์ด๋ฆ„,descripting ์„ค์ • (๊ฐ•์˜์—์„œ๋Š” My-RDS-SG)
    • VPC ์„ ํƒ (acloudguruVPC)
    • add rule
      • SSH / 22 / 10.0.1.0/24
      • MYSQL/Aurora / 3306 / 10.0.1.0/24
      • HTTP / 80 / 10.0.1.0/24
      • HTTPS / 443 / 10.0.1.0/24
      • All ICMP-IPv4 / 0 - 65535 / 10.0.1.0/24
  • ์ธ์Šคํ„ด์Šค๋กœ ๊ฐ€์„œ -> MyMySQL ์„ ํƒ -> action -> change security group ์„ ํƒ -> My-RDS-SG๋กœ ๋ณ€๊ฒฝ

2. ssh๋กœ Public ์„œ๋ฒ„์—์„œ Private ์„œ๋ฒ„๋กœ ์ ‘์†ํ•ด๋ณด๊ธฐ (์‹ค๋ฌด์—์„œ๋Š” ์ ˆ๋Œ€ ํ•˜์ง€ ๋ง ๊ฒƒ)

  • ping 10.0.2.143
  • nano mypvk.pem -> ํ‚ค ๋‚ด์šฉ ๋ณต๋ถ™
  • chmod 400 mypvk.pem
  • ssh ec2-user@10.0.2.143 -i mypvk.pem

Network Address Translation(NAT) / NAT Instances & NAT Gateways

1. NAT Instance ์„ค์ •ํ•˜๊ธฐ

  • EC2๋กœ ์ด๋™
  • ์ธ์Šคํ„ด์Šค ์‹œ์ž‘ํ•˜๊ธฐ
  • Community AMIs ์„ ํƒ
  • nat ๊ฒ€์ƒ‰
  • amzn-ami-vpc-nat-hvm~.gp2 ์„ ํƒ
  • VPC ์™€ Subnet ์„ ํƒ
  • Tag ์„ค์ • Name / NAT-INSTANCE
  • ๋ณด์•ˆ๊ทธ๋ฃน web-DMZ ์„ ํƒ
  • ์‹œ์ž‘
  • ๋ณด์•ˆ๊ทธ๋ฃน web-DMZ์— Https / 443 / 0.0.0.0,::/0 ์ถ”๊ฐ€
  • NAT-INSTANCE ์„ ํƒ ํ›„, Actions - Networking - Change Source/Dest. Check ์„ ํƒ

    • ๊ฐ๊ฐ์˜ EC2 ์ธ์Šคํ„ด์Šค๋Š” ๋””ํดํŠธ๋กœ source/destination์„ ์ฒดํฌํ•œ๋‹ค. ์ด๊ฒƒ์€ ์ธ์Šคํ„ด์Šค๊ฐ€ ์ฃผ๊ณ  ๋ฐ›๋Š” ๋ชจ๋“  ํŠธ๋ž˜ํ”ฝ์˜ source ๋˜๋Š” destination์ด ๋˜์–ด์•ผํ•œ๋‹ค๋Š” ๋œป์ด๋‹ค. ํ•˜์ง€๋งŒ NAT ์ธ์Šคํ„ด์Šค๋Š” ์Šค์Šค๋กœ๊ฐ€ source/destination์ด ์•„๋‹ˆ๋”๋ผ๋„ ๋ฐ˜๋“œ์‹œ ํŠธ๋ž˜ํ”ฝ์„ ์ฃผ๊ณ ๋ฐ›์„ ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค. ๊ทธ๋Ÿฌ๋ฏ€๋กœ NAT ์ธ์Šคํ„ด์Šค์˜ source/destination checks๋ฅผ ๋ฐ˜๋“œ์‹œ disable it ํ•ด์•ผํ•œ๋‹ค.
  • VPC - Route Tables ๋กœ ์ด๋™

  • Default Route ํ…Œ์ด๋ธ”์„ ์„ ํƒํ•˜๊ณ  ์—ฌ๊ธฐ์—์„œ NAT ์ธ์Šคํ„ด์Šค์— ์˜ํ•ด Route out ๋˜๋„๋ก ํ•˜๊ธฐ ์œ„ํ•ด ๋ฐ‘์— Routes ํด๋ฆญํ•ด์„œ Add another route ํด๋ฆญ

  • Destiantion์— 0.0.0.0/0 ๋„ฃ๊ณ  Target์—๋Š” MyIGW๊ฐ€ ์•„๋‹Œ NAT ์ธ์Šคํ„ด์Šค ์„ ํƒ. ์ด๋กœ์จ NAT ์ธ์Šคํ„ด์Šค์—์„œ ๋ฐ”๊นฅ์„ธ์ƒ์œผ๋กœ ๋‚˜๊ฐ€๋Š” Route out ์„ค์ •๋œ ๊ฒƒ.

2. NAT ์ธ์Šคํ„ด์Šค์˜ ํ•œ๊ณ„

  • NAT ์ธ์Šคํ„ด์Šค๋กœ ๊ตฌ์„ฑํ•˜๋Š”๊ฒƒ์€ ๋‹จ์ผ ์ธ์Šคํ„ด์Šค์— ๋‹จ์ผ AZ์ด๊ธฐ ๋•Œ๋ฌธ์— ๋ณ‘๋ชฉํ˜„์ƒ์— ์ทจ์•ฝํ•˜๊ณ , ๋ฌธ์ œ๋ฐœ์ƒ์‹œ Private Subnet ์•ˆ์˜ ๋ชจ๋“  ์„œ๋น„์Šค๊ฐ€ ์ธํ„ฐ๋„ท ์—‘์„ธ์Šค๋ฅผ ์žƒ๊ฒŒ ๋œ๋‹ค.
  • Auto scaling group์— ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ multiple AZ๊ณผ multiple Route out to internet์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์ง€๋งŒ, ์ ์  ๋ณต์žกํ•ด์งˆ ๋ฟ์ด๋‹ค.
  • ๋‹คํ–‰ํžˆ ์•„๋งˆ์กด์ด NAT Gateway๋ฅผ ์ถœ์‹œํ–ˆ๊ณ , ์ด๋ฅผ ํ†ตํ•ด ๋‹จ์ผ ์ธ์Šคํ„ด์Šค์™€ ๋‹จ์ผ AZ์— ์˜์กดํ•˜๋Š” ๊ฒƒ์—์„œ ๋ฒ—์–ด๋‚  ์ˆ˜ ์žˆ๋‹ค.

3. NAT Gateway ์„ค์ •ํ•˜๊ธฐ

  • VPC๋กœ ์ด๋™
  • NAT Gateway๋Š” IPv4๋กœ ๋™์ž‘ํ•˜๊ณ , Egress Only Internet Gateway๋Š” IPv6๋กœ ๋™์ž‘ํ•œ๋‹ค.
  • NAT Gateway ์„ ํƒ ๋ฐ Create NAT Gateway ํด๋ฆญ
  • Subnet์€ ์ปค์Šคํ…€ VPC์˜ ํผ๋ธ”๋ฆญ ์„œ๋ธŒ๋„ท ์„ ํƒ
  • Create New EIP ํด๋ฆญ
  • Create a NAT Gateway ํด๋ฆญ (์ƒ์„ฑ๋˜๋Š”๋ฐ 15๋ถ„์ •๋„ ์†Œ์š”)
  • NAT Gateways๋กœ ๊ฐ€์„œ ๋งŒ๋“  NAT Gateway์˜ Status๊ฐ€ available์ด ๋˜๋ฉด Route Tables๋กœ ์ด๋™
  • Default Route Table ์„ ํƒ ๋ฐ ๋ฐ‘์˜ Routes ํด๋ฆญ
  • Add another route (Destination: 0.0.0.0/0 Target: NAT Gateway) ๋ฐ save.
  • EC2 ์ธ์Šคํ„ด์Šค๋กœ ์ด๋™

4. NAT Gateway์™€ NAT Instance ๋น„๊ต

  • Availability
    • NAT Gateway : ๋…๋ฆฝ์ ์ธ ์•„ํ‚คํ…์ณ๋ฅผ ๊ตฌ์ถ•ํ•˜๊ธฐ ์œ„ํ•ด ๊ฐ๊ฐ์˜ AZ์— NAT Gateway๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค.
    • NAT Instance : ์ธ์Šคํ„ด์Šค๋“ค ๊ฐ„์˜ failover(์‹œ์Šคํ…œ ๋Œ€์ฒด ์ž‘๋™)๋ฅผ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด script ์‚ฌ์šฉ
  • Bandwidth
    • NAT Gateway : 10Gbps ๊นŒ์ง€ ์ง€์›
    • NAT Instance : ์ธ์Šคํ„ด์Šค ํƒ€์ž…์˜ ๋Œ€์—ญํญ์— ๋”ฐ๋ผ ๋‹ค๋ฆ„
  • Maintenance
    • NAT Gateway : AWS์— ์˜ํ•ด ๊ด€๋ฆฌ๋œ๋‹ค.
    • NAT Instance : ์ง์ ‘ ๊ด€๋ฆฌํ•ด์•ผํ•œ๋‹ค. (ex ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๊ฑฐ๋‚˜ ์ธ์Šคํ„ด์Šค์— OS patch)
  • Performance
    • NAT Gateway : ์†Œํ”„ํŠธ์›จ์–ด๊ฐ€ NAT ํŠธ๋ž˜ํ”ฝ์„ ํ•ธ๋“ค๋งํ•˜๊ธฐ ์œ„ํ•ด ์ตœ์ ํ™”๋˜์–ด์žˆ๋‹ค.
    • NAT Instance : A generic Amazon Linux AMI that’s configured to perform NAT
  • Cost
    • NAT Gateway : ์‚ฌ์šฉํ•œ NAT ๊ฒŒ์ดํŠธ์›จ์ด์˜ ์ˆ˜, ์‚ฌ์šฉ์‹œ๊ฐ„, NAT ๊ฒŒ์ดํŠธ์›จ์ด๋ฅผ ํ†ตํ•ด ๋ณด๋‚ธ ๋ฐ์ดํ„ฐ์˜ ํฌ๊ธฐ์— ๋”ฐ๋ผ ์š”๊ธˆ์ด ๋ถ€๊ณผ๋œ๋‹ค.
    • NAT Instance : ์‚ฌ์šฉํ•œ NAT ์ธ์Šคํ„ด์Šค์˜ ์ˆ˜, ์‚ฌ์šฉ์‹œ๊ฐ„, ์ธ์Šคํ„ด์Šค์˜ ํƒ€์ž…๊ณผ ์‚ฌ์ด์ฆˆ์— ๋”ฐ๋ผ ์š”๊ธˆ์ด ๋ถ€๊ณผ๋œ๋‹ค.
  • Type and Size
    • NAT Gateway : Uniform offering - ํƒ€์ž…๊ณผ ์‚ฌ์ด์ฆˆ๋ฅผ ๊ฒฐ์ •ํ•  ํ•„์š”์—†๋‹ค.
    • NAT Instance : ์˜ˆ์ƒ๋˜๋Š” ์›Œํฌ๋กœ๋“œ์— ๋”ฐ๋ผ ์•Œ๋งž๋Š” ์ธ์Šคํ„ด์Šค ํƒ€์ž…๊ณผ ์‚ฌ์ด์ฆˆ๋ฅผ ์„ ํƒํ•ด์•ผํ•œ๋‹ค.
  • Public IP Addresses
    • NAT Gateway : ์ƒ์„ฑ์‹œ์— NAT Gateway์™€ ์—ฐ๊ฒฐ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” Elastic IP address๋ฅผ ์„ ํƒํ•œ๋‹ค.
    • NAT Instance : Elastic IP address ๋˜๋Š” Public IP address๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • Private IP Addresses
    • NAT Gateway : ๊ฒŒ์ดํŠธ์›จ์ด๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ์„œ๋ธŒ๋„ท์˜ IP์ฃผ์†Œ ๋ฒ”์œ„์—์„œ ์ž๋™์œผ๋กœ ์„ ํƒ๋œ๋‹ค.
    • NAT Instance : ์ธ์Šคํ„ด์Šค๋ฅผ ๋Ÿฐ์นญํ• ๋•Œ ์„œ๋ธŒ๋„ท์˜ IP์ฃผ์†Œ ๋ฒ”์œ„์—์„œ ํŠน์ • private IP์ฃผ์†Œ๋ฅผ ํ• ๋‹นํ•œ๋‹ค.
  • Security Groups
    • NAT Gateway : NAT Gateway์™€ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†๋‹ค. ๋Œ€์‹  ๋ณด์•ˆ๊ทธ๋ฃน์„ NAT ๊ฒŒ์ดํŠธ์›จ์ด ๋’ค์˜ ๋ฆฌ์†Œ์Šค์™€ ์—ฐ๊ฒฐํ•˜์—ฌ ์ธ๋ฐ”์šด๋“œ/์•„์›ƒ๋ฐ”์šด๋“œ ํŠธ๋ž˜ํ”ฝ์„ ์ œ์–ดํ•  ์ˆ˜ ์žˆ๋‹ค.
    • NAT Instance : NAT Instance์™€ ๊ทธ ๋’ค์˜ ๋ฆฌ์†Œ์Šค์™€ ์—ฐ๊ฒฐํ•˜์—ฌ ์ธ๋ฐ”์šด๋“œ/์•„์›ƒ๋ฐ”์šด๋“œ ํŠธ๋ž˜ํ”ฝ์„ ์ œ์–ดํ•œ๋‹ค.
  • Network ACLs
    • NAT Gateway : ๋„คํŠธ์›Œํฌ ACL์„ ์‚ฌ์šฉํ•˜์—ฌ NAT ๊ฒŒ์ดํŠธ์›จ์ด๊ฐ€ ์œ„์น˜ํ•˜๊ณ  ์žˆ๋Š” ์„œ๋ธŒ๋„ท์—์„œ ๋ณด๋‚ด๊ณ  ๋ฐ›๋Š” ํŠธ๋ž˜ํ”ฝ์„ ์ œ์–ดํ•œ๋‹ค.
    • NAT Instance : ๋„คํŠธ์›Œํฌ ACL์„ ์‚ฌ์šฉํ•˜์—ฌ NAT ์ธ์Šคํ„ด์Šค๊ฐ€ ์œ„์น˜ํ•˜๊ณ  ์žˆ๋Š” ์„œ๋ธŒ๋„ท์—์„œ ๋ณด๋‚ด๊ณ  ๋ฐ›๋Š” ํŠธ๋ž˜ํ”ฝ์„ ์ œ์–ดํ•œ๋‹ค.
  • Flow Logs
    • NAT Gateway : ํŠธ๋ž˜ํ”ฝ์„ ์บก์ณํ•˜๊ธฐ ์œ„ํ•ด flow logs๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
    • NAT Instance : ํŠธ๋ž˜ํ”ฝ์„ ์บก์ณํ•˜๊ธฐ ์œ„ํ•ด flow logs๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • Port Forwarding
    • NAT Gateway : ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค.
    • NAT Instance : ํฌํŠธํฌ์›Œ๋”ฉ์„ ์œ„ํ•ด ์ˆ˜๋™์œผ๋กœ ์„ค์ •์„ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ํ•ด์•ผํ•œ๋‹ค.
  • Bastion Servers
    • NAT Gateway : ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค.
    • NAT Instance : bastion ์„œ๋ฒ„๋กœ์„œ ์‚ฌ์šฉํ•œ๋‹ค.
  • Traffic Metrics
    • NAT Gateway : NAT ๊ฒŒ์ดํŠธ์›จ์ด์˜ CloudWatch ์ง€ํ‘œ๋ฅผ ํ™•์ธ.
    • NAT Instance : ์ธ์Šคํ„ด์Šค์˜ CloudWatch ์ง€ํ‘œ ํ™•์ธ
  • Timeout behavior
    • NAT Gateway : ์—ฐ๊ฒฐ ์ œํ•œ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ•˜๋ฉด NAT ๊ฒŒ์ดํŠธ์›จ์ด๋Š” ์—ฐ๊ฒฐ์„ ๊ณ„์†ํ•˜๋ คํ•˜๋Š” NAT ๊ฒŒ์ดํŠธ์›จ์ด ๋’ค์˜ ๋ฆฌ์†Œ์Šค๋กœ RST ํŒจํ‚ท์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.(FIN ํŒจํ‚ท ์•ˆ๋ณด๋ƒ„)
    • NAT Instance : ์—ฐ๊ฒฐ ์ œํ•œ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ•˜๋ฉด NAT ์ธ์Šคํ„ด์Šค๋Š” NAT ์ธ์Šคํ„ด์Šค ๋’ค์˜ ๋ฆฌ์†Œ์Šค๋กœ FIN ํŒจํ‚ท์„ ์ „์†กํ•˜์—ฌ ์—ฐ๊ฒฐ์„ ๋‹ซ๋Š”๋‹ค.
  • IP fragmentation
    • NAT Gateway : UDP ํ”„๋กœํ† ์ฝœ์—์„œ IP ์กฐ๊ฐํ™”๋œ ํŒจํ‚ท์˜ ์ „๋‹ฌ์„ ์ง€์›ํ•œ๋‹ค. TCP ๋ฐ ICMP ํ”„๋กœํ† ์ฝœ์— ๋Œ€ํ•ด์„œ๋Š” ์กฐ๊ฐํ™”๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š๊ณ , ์ด๋Ÿฌํ•œ ํ”„๋กœํ† ์ฝœ์˜ ์กฐ๊ฐํ™”๋œ ํŒจํ‚ท์€ ์‚ญ์ œ๋œ๋‹ค.
    • NAT Instance : UDP, TCP ๋ฐ ICMP ํ”„๋กœํ† ์ฝœ์— ๋Œ€ํ•ด IP ์กฐ๊ฐํ™”๋œ ํŒจํ‚ท์˜ ์žฌ์ˆ˜์ง‘์„ ์ง€์›ํ•œ๋‹ค.

5. NAT Gateway ๊ตฌ์„ฑ ๋ชจ์Šต

6. ์ •๋ฆฌ

  • NAT Instance
    • When creating a NAT instance, Disable Source/Destination Check on the Instance
    • NAT instances must be in a public subnet
    • There must be a route out of the private subnet to the NAT instance, in order for this to work
    • The amount of traffic that NAT insatnaces can support depends on the instance size. If you are bottlenecking, increase the instance size
    • You can create high availability using Autoscaling Groups, multiple subnets in different AZs, and a script to automate failover
    • Behind a Security Group
  • NAT Gateway
    • Preferred by the enterprise
    • Scale automatically up to 10Gbps
    • No need to patch
    • Not associated with security groups
    • Automatically assigned a public ip address
    • Remember to update your route tables
    • No need to disable Source/Destination Checks
    • More secure than a NAT instance
      • Do not have SSH access to your NAT Gateway

Network Access Control Lists vs. Security Groups

1. Network ACL ์„ค์ •

  • VPC ์ด๋™
  • Network ACLs ์ด๋™
  • Create Network ACL ํด๋ฆญ
    • Name tag : MyWebNACL , VPC ์„ ํƒํ•˜๊ณ  ์ƒ์„ฑ
  • Inbound Rules ์ˆ˜์ •
    • Edit ํด๋ฆญ
    • Rule #๋Š” 100๋ถ€ํ„ฐ ์‹œ์ž‘, 100๋ฒˆ์€ IPv4, 101๋ฒˆ์€ IPv6.
    • Rule์€ ๋ฒˆํ˜ธ ์ˆœ์„œ๋Œ€๋กœ ์ ์šฉ๋œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด 100๋ฒˆ์— ์—ด์–ด๋‘๊ณ  99๋ฒˆ์— ๋‹ซ์•„๋‘๋ฉด 99๋ฒˆ์ด ์šฐ์„  ์ ์šฉ๋œ๋‹ค.
    • 100 HTTP(80) 0.0.0.0/0
    • 200 HTTPS(443) 0.0.0.0/0
    • 300 SSH(22) 0.0.0.0/0
  • Outbound Rules ์ˆ˜์ •
    • 100 HTTP(80) 0.0.0.0/0
    • 200 HTTPS(443) 0.0.0.0/0
    • 300 Custom(1024-65535) 0.0.0.0/0
  • Subnet Association ์ด๋™
    • ์„œ๋ธŒ๋„ท๊ณผ ์—ฐ๊ฒฐ

2. Exam Tips - Network ACLs

  • Your VPC automatically comes a default network ACL, and by default it allows all outbound and inbound traffic
  • You can create custom network ACLs, By default, each custom network ACL denies all inbound and outbound traffic until you add rules
  • Each subnet in your VPC must be associated with a network ACL. If you don’t explicitly associate a subnet with a network ACL, the subnet is automatically associated with the default network ACL
  • You can associate a network ACL with multiple subnets; however, a subnet can be associated with only one network ACL at a time. When you associate a network ACL with a subnet, the previous association is removed
  • Network ACLs contain a numbered list of rules that is evaluated in order, starting with the lowest numbered rule
  • Network ACLs are stateless; responses to allowed inbound traffic are subject to the rules for outbound traffic (and vice versa)
  • Block IP Addresses using network ACLs not Security Groups

Load Balancers & Custom VPCs

Elastic Load Balancer๋Š” ๋“ค์–ด์˜ค๋Š” ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ํŠธ๋ž˜ํ”ฝ์„ EC2 ์ธ์Šคํ„ด์Šค, ์ปจํ…Œ์ด๋„ˆ, IP์ฃผ์†Œ์™€ ๊ฐ™์€ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์— ์ž๋™์œผ๋กœ ๋ถ„์‚ฐ์‹œํ‚จ๋‹ค.
๋˜ํ•œ ๋‹จ์ผ AZ ๋˜๋Š” ๋‹ค์ˆ˜์˜ AZ์—์„œ ๋‹ค์–‘ํ•œ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ถ€ํ•˜๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.

Load Balancer ์„ค์ •

  • Application Load Balancer ์ƒ์„ฑ
    • Name ์„ค์ • (MyALB)
    • Internet facing
    • IPv4
    • HTTP / 80
    • VPC ์„ ํƒ
    • ์ƒ์„ฑ ์™„๋ฃŒ

VPC Flow Logs

VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC
Flow log data is stored using Amazon CloudWatch Logs. After creating a flow log, you can view and retrieve its data in Amazon CloudWatch Logs.

  • Flow logs can be created at 3 levels
    • VPC
    • Subnet
    • Network Interface Level

Flow Log ์„ค์ •

  • VPC๋กœ ์ด๋™
  • VPC ์„ ํƒ ํ›„ Actions -> Create Flow Log
  • Filter ์„ ํƒ
  • Role ์„ค์ • (์ฒ˜์Œ์—๋Š” Set Up Permissions๋กœ ์„ค์ •)
  • Destination Log Group ์„ค์ • (์ฒ˜์Œ์—๋Š” CloudWatch๋กœ ๊ฐ€์„œ ์„ค์ •)
    • CloudWatch ์ด๋™
    • ์ขŒ์ธก ๋ฉ”๋‰ด์— Logs ์„ ํƒ
    • Create log group ํด๋ฆญํ•˜๊ณ  ์ƒ์„ฑ
    • Flow log ์ƒ์„ฑ ํ™”๋ฉด์œผ๋กœ ๋Œ์•„๊ฐ€๊ธฐ

VPC Flow Logs Exam Tips

  • You cannot enable flow logs for VPCs that are peered with your VPC unless the peer VPC is in your account.
  • You cannot tag a flow log.
  • After you’ve creaeted a flow log, you cannot change its configuration; for example, you can’t associate a different IAM role with the flow log.
  • Not all IP Traffic is monitored
    • Traffic generated by instances when they contact the Amazon DNS server. If you use your own DNS server, then all traffic to that DNS server is logged.
    • Traffic generated by a Windows instance for Amazon Windows license activation.
    • Traffic to and from 169.254.169.254 for instance metadata.
    • DHCP traffic
    • Traffic to the reserved IP address for the default VPC router

NAT vs Bastion

Bastion host

  • Bastion host๋Š” ์™ธ๋ถ€์—์„œ ์ ‘๊ทผ์ด ์ฐจ๋‹จ๋˜์–ด์žˆ๋Š” Private Subnet์— ๋ฐฐํฌ๋œ ์ธ์Šคํ„ด์Šค์— SSH๋กœ ์ ‘๊ทผํ•˜๊ธฐ ์œ„ํ•œ ์ผ์ข…์˜ Proxy ์—ญํ• ์„ ํ•˜๋Š” ์„œ๋ฒ„.
  • Bastion์˜ logging์„ ๊ด€๋ฆฌํ•˜๋ฉด Private Subnet์— ์ ‘์†ํ•˜๋Š” ๋ชจ๋“  ๊ธฐ๋ก์„ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.
  • Bastion host๋Š” Public Subnet์— ์œ„์น˜ํ•˜๋„๋ก EC2 instance๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.
  • ์™ธ๋ถ€ ์‚ฌ์šฉ์ž์˜ ํŠน์ • IP๋งŒ ํ—ˆ์šฉํ•˜์—ฌ Bastion host์— ์ ‘์† ๊ฐ€๋Šฅํ•˜๋„๋ก ๋„คํŠธ์›Œํฌ ACL๊ณผ Security Group์„ ์„ค์ •ํ•œ๋‹ค.

SSH Tunneling

SSH Tunneling์„ ์ด์šฉํ•ด์„œ ์™ธ๋ถ€์—์„œ Private Instance์— ์ ‘์†ํ•˜๋Š” ๋ฐฉ๋ฒ•

  1. Local PC์—์„œ Bastion host์— SSH ํ• ๋•Œ, -L ์˜ต์…˜์„ ์ด์šฉํ•˜์—ฌ ์ ‘์†ํ•œ๋‹ค.
    ssh -i key.pem -L 22:(์ ‘์†ํƒ€๊ฒŸ ์ธ์Šคํ„ด์Šค Private IP):22 ec2-user@(Bastion host Public IP)
    • SSH๋ฅผ ์ด์šฉํ•ด Bastion host์— ์ ‘์†ํ•  ๋•Œ Local ํ„ฐ๋„๋ง์œผ๋กœ ์ ‘์†ํ•˜๋Š” ๋ช…๋ น์–ด
    • -L ์˜ต์…˜์ธ 22:(์ ‘์†ํƒ€๊ฒŸ ์ธ์Šคํ„ด์Šค Private IP):22 ์˜ ์˜๋ฏธ๋Š” ๋กœ์ปฌ ํฌํŠธ 22๋ฒˆ์œผ๋กœ ์ ‘์†ํƒ€๊ฒŸ ์ธ์Šคํ„ด์Šค์˜ 22๋ฒˆ ํฌํŠธ๋กœ ์ ‘์†ํ•˜๊ฒ ๋‹ค
  2. ํ„ฐ๋ฏธ๋„์„ ํ•˜๋‚˜ ๋” ์—ด์–ด์„œ ssh -i key.pem ec2-user@localhost
    • ์œ„์˜ ๋ช…๋ น์–ด๋กœ ์ ‘์†ํ•˜๋ฉด ์ž๋™์œผ๋กœ ํƒ€๊ฒŸ ์ธ์Šคํ„ด์Šค๋กœ SSH Tunneling๋˜์–ด ์ ‘์†๋œ๋‹ค.
  3. ์ด ๋ฐฉ๋ฒ•์œผ๋กœ Private Subnet์— ์œ„์น˜ํ•œ ๋ชจ๋“  ์„œ๋ฒ„์— ์ ‘์†๊ฐ€๋Šฅ

NAT vs Bastion Exam Tips

  • A NAT is used to provide internet traffic to EC2 instances in private subnets
  • A Bastion is used to securely administer EC2 instances (using SSH or RDP) in private subnets

VPC Endpoint

ํ”„๋ผ์ด๋น— ๋„คํŠธ์›Œํฌ๋กœ Endpoint S3์— ์ ‘๊ทผํ•˜๊ธฐ

*Reference