© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Claudia Charro
Arquiteta de Soluções
AWS
Criando seu Data Center Virtual:
Fundamentos de VPC e Opções de
Conectividade
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
O que é esperado nessa sessão?
• Conceitos de VPC;
• Setup básico de VPC;
• Conectividade com ambiente on-premises;
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
E então, o que é VPC?
• VPC – Virtual Private Cloud;
• Isolamento lógico de rede;
• Permite a segregação de redes (Público e Privada);
• Serviço de escopo de região;
• Permite a escolha do seu proprio range de Ips;
• Provê conexão com infraestrutura on-premises;
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Criando VPC
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Criando VPC: Passo a Passo
Escolher o range
de IPs
Configurar
subnets nas
Availability Zones
Criar rotas
(Utilizando
Internet Gateway
ou NAT)
Autorizar tráfego
de/para VPC
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Escolher o range de IPs
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Escolher os ranges para sua VPC – IPv4
172.31.0.0/16
Recomendado:
RFC1918
Recomendado:
/16
(64K endereços)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Criação das subnets nas Availability
Zones
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Configurar ranges de IP address para sua subnet
172.31.0.0/16
Availability Zone Availability Zone Availability Zone
VPC subnet VPC subnet VPC subnet
172.31.0.0/24 172.31.1.0/24 172.31.2.0/24
sa-east-1a sa-east-1b sa-east-1c
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Demo
Criação de VPC e subnets
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Criar rotas na VPC
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tabela de Rotas na sua VPC
• Possuem regras por onde os pacotes trafegarão;
• Na VPC sempre possui tabela de rotas padrão;
• … e você pode designar tabelas de rotas diferentes para
subnets diferentes.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tráfego destinado para
VPC ficam na VPC.
Rotas Internas dentro da VPC
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tudo que não tem destino para VPC, é
enviado para Internet.
Internet Gateway (Utilizado para subnet Públicas)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Acesso à Internet via NAT Gateway
VPC subnet Privada VPC subnet Pública
0.0.0.0/0
0.0.0.0/0
Public IP
NAT Gateway
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Autorizar tráfego de/para VPC
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Network ACLs = Regras stateless firewall
Permitir todo o tráfego de entrada
Aplicado no nível de subnet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security Groups segue o fluxo da sua aplicação
“MyWebServers” Security Group
“MyBackends” Security Group
Permitir acesso somente
“MyWebServers”
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security Groups = stateful firewall
Porta 80 aberta para o mundo
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security Groups = stateful firewall
Porta do App Server aberta somente
para frota de Servidores Web
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Conectividade na AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Além da conectividade com Internet
Roteamento no nivel
de Subnet
Conectando com a
sua rede corporativa
Conectando a outras
VPCs
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Roteamento no nível de subnets
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Diferentes tabelas de rotas para diferentes subnets
VPC subnet
VPC subnet
Possui rota para
Internet
Não possui rota para
Internet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Conectando à outras VPC:
VPC Peering
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serviços compartilhados: Utilizando VPC peering
Serviços comuns/core
• Autenticação/Diretório;
• Monitoramento;
• Logging;
• Administração remota;
• Segurança;
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Inter-Region VPC Peering
sa-east-1 (São Paulo) us-east-1 (N.Virginia)
VPC A VPC B
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Conectando sua rede:
Virtual Private Network &
Direct Connect
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Conectando sua rede com VPN/Direct Conenct
VPN
Direct Connect
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS VPC/VPN
• Rotas estáticas ou dinâmicas (BGP);
• Conexões iniciadas pelo Customer Gateway (definição do
appliance do cliente);
• IPSec Security Associations em modo de túnel;
• Sempre é disponibilizado 2 IPs para conexão (HA);
• Conectividade feita pela Internet;
• Baixo custo de serviço;
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPN: O que você precisa saber?
Customer
Gateway
Virtual
Gateway
Dois tuneis IPSec
192.168.0.0/16 172.31.0.0/16
192.168/16
Seu device de rede
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Conexão dedicada e privada com a AWS;
• Cobrança reduzida de data-out (data-in continua
gratuito);
• Performance consistente;
• Pelo menos 1 ponto de conexão por região;
• Opção para conexões redundantes;
• Múltiplas contas AWS podem compartilhar a conexão;
• Portas de conexões de 50M a 10G;
• 50-500M feita com parceiro;
• 1G e 10G direto com a AWS;
AWS Direct Connect
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Direct Connect – Alguns Locais
Região AWS AWS Direct Connect (Locais)
Asia Pacific (Singapore) Equinix SG2
Asia Pacific (Singapore) Global Switch
Asia Pacific (Sydney) Equinix SY3
Asia Pacific (Sydney) Global Switch
Asia Pacific (Tokyo) Equinix OS1
Asia Pacific (Tokyo) Equinix TY2
China (Beijing) Sinnet JiuXianqiao IDC
China (Beijing) CIDS Jiachuang IDC
EU (Frankfurt) Equinix FR5
EU (Frankfurt) Interxion Frankfurt
EU (Ireland) Eircom Clonshaugh
EU (Ireland) TelecityGroup, London Docklands'
South America (São Paulo) Terremark NAP do Brasil
South America (São Paulo) Tivit
US East (Virginia) CoreSite NY1 & NY2
US East (Virginia) Equinix DC1 - DC6 & DC10
US West (Northern California) CoreSite One Wilshire & 900 North Alameda, CA
US West (Northern California) Equinix SV1 & SV5
US West (Oregon) Equinix SE2 & SE3
US West (Oregon) Switch SUPERNAP, Las Vegas
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPN vs DirectConnect
• Ambos permitem conexão segura entre sua
rede e VPC;
• VPN é um par de túnel IPSec que trafegará
pela Internet;
• DirectConnect é conexão dedicada e latência
controlada;
• Para workloads de alta disponibilidade:
Utilizar ambos (failover);
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC Flow Logs: Analise seu tráfego
Visibilidade da aplicabilidade
do Security Group;
Fazer troubleshooting de
conectividade de rede;
Possibilidade de analizar
tráfego;
Compatível com Amazon
GuardDuty.10.10.0.0/16
10.10.1.0/24
AZ A
10.10.2.0/24
AZ B
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC Flow Logs data in CloudWatch Logs
O que é isso?
# dig +short -x 52.90.45.101
ec2-52-90-45-101.compute-1.amazonaws.com.
ACCEPT
Porta TCP 443 =
HTTPS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
VPC endpoints: Amazon S3 and Amazon
DynamoDB
10.10.0.0/16
10.10.1.0/24
AZ A
10.10.2.0/24
AZ B
S3 bucket
Rota para o
S3/DynamoDB-VPC
endpoint
DynamoDB
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Direct Connect Gateway
• Possibilidade de se utilizar o Direct Connect para se comunicar
com outras regiões de forma privada;
• Possibilidade de plugar mais de uma VPC em um único Direct
Connect;
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Recapitulando
• VPC;
• Subnets Públicas vs Subnets Privadas;
• Tabelas de Rota;
• VPC VPN vs Direct Connect;
• Endpoints na rede privada;
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Por favor, participe da pesquisa sobre essa sessão
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Obrigado!

Criando seu Data Center Virtual: Fundamentos de VPC e Opções de Conectividade

  • 1.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Claudia Charro Arquiteta de Soluções AWS Criando seu Data Center Virtual: Fundamentos de VPC e Opções de Conectividade
  • 2.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. O que é esperado nessa sessão? • Conceitos de VPC; • Setup básico de VPC; • Conectividade com ambiente on-premises;
  • 3.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. E então, o que é VPC? • VPC – Virtual Private Cloud; • Isolamento lógico de rede; • Permite a segregação de redes (Público e Privada); • Serviço de escopo de região; • Permite a escolha do seu proprio range de Ips; • Provê conexão com infraestrutura on-premises;
  • 4.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Criando VPC
  • 5.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Criando VPC: Passo a Passo Escolher o range de IPs Configurar subnets nas Availability Zones Criar rotas (Utilizando Internet Gateway ou NAT) Autorizar tráfego de/para VPC
  • 6.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Escolher o range de IPs
  • 7.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Escolher os ranges para sua VPC – IPv4 172.31.0.0/16 Recomendado: RFC1918 Recomendado: /16 (64K endereços)
  • 8.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Criação das subnets nas Availability Zones
  • 9.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Configurar ranges de IP address para sua subnet 172.31.0.0/16 Availability Zone Availability Zone Availability Zone VPC subnet VPC subnet VPC subnet 172.31.0.0/24 172.31.1.0/24 172.31.2.0/24 sa-east-1a sa-east-1b sa-east-1c
  • 10.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Demo Criação de VPC e subnets
  • 12.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Criar rotas na VPC
  • 13.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Tabela de Rotas na sua VPC • Possuem regras por onde os pacotes trafegarão; • Na VPC sempre possui tabela de rotas padrão; • … e você pode designar tabelas de rotas diferentes para subnets diferentes.
  • 14.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Tráfego destinado para VPC ficam na VPC. Rotas Internas dentro da VPC
  • 15.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Tudo que não tem destino para VPC, é enviado para Internet. Internet Gateway (Utilizado para subnet Públicas)
  • 16.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Acesso à Internet via NAT Gateway VPC subnet Privada VPC subnet Pública 0.0.0.0/0 0.0.0.0/0 Public IP NAT Gateway
  • 17.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Autorizar tráfego de/para VPC
  • 18.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Network ACLs = Regras stateless firewall Permitir todo o tráfego de entrada Aplicado no nível de subnet
  • 19.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Security Groups segue o fluxo da sua aplicação “MyWebServers” Security Group “MyBackends” Security Group Permitir acesso somente “MyWebServers”
  • 20.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Security Groups = stateful firewall Porta 80 aberta para o mundo
  • 21.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Security Groups = stateful firewall Porta do App Server aberta somente para frota de Servidores Web
  • 22.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Conectividade na AWS
  • 23.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Além da conectividade com Internet Roteamento no nivel de Subnet Conectando com a sua rede corporativa Conectando a outras VPCs
  • 24.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Roteamento no nível de subnets
  • 25.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Diferentes tabelas de rotas para diferentes subnets VPC subnet VPC subnet Possui rota para Internet Não possui rota para Internet
  • 26.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Conectando à outras VPC: VPC Peering
  • 27.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serviços compartilhados: Utilizando VPC peering Serviços comuns/core • Autenticação/Diretório; • Monitoramento; • Logging; • Administração remota; • Segurança;
  • 28.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Inter-Region VPC Peering sa-east-1 (São Paulo) us-east-1 (N.Virginia) VPC A VPC B
  • 29.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Conectando sua rede: Virtual Private Network & Direct Connect
  • 30.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Conectando sua rede com VPN/Direct Conenct VPN Direct Connect
  • 31.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. AWS VPC/VPN • Rotas estáticas ou dinâmicas (BGP); • Conexões iniciadas pelo Customer Gateway (definição do appliance do cliente); • IPSec Security Associations em modo de túnel; • Sempre é disponibilizado 2 IPs para conexão (HA); • Conectividade feita pela Internet; • Baixo custo de serviço;
  • 32.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. VPN: O que você precisa saber? Customer Gateway Virtual Gateway Dois tuneis IPSec 192.168.0.0/16 172.31.0.0/16 192.168/16 Seu device de rede
  • 33.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. • Conexão dedicada e privada com a AWS; • Cobrança reduzida de data-out (data-in continua gratuito); • Performance consistente; • Pelo menos 1 ponto de conexão por região; • Opção para conexões redundantes; • Múltiplas contas AWS podem compartilhar a conexão; • Portas de conexões de 50M a 10G; • 50-500M feita com parceiro; • 1G e 10G direto com a AWS; AWS Direct Connect
  • 34.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. AWS Direct Connect – Alguns Locais Região AWS AWS Direct Connect (Locais) Asia Pacific (Singapore) Equinix SG2 Asia Pacific (Singapore) Global Switch Asia Pacific (Sydney) Equinix SY3 Asia Pacific (Sydney) Global Switch Asia Pacific (Tokyo) Equinix OS1 Asia Pacific (Tokyo) Equinix TY2 China (Beijing) Sinnet JiuXianqiao IDC China (Beijing) CIDS Jiachuang IDC EU (Frankfurt) Equinix FR5 EU (Frankfurt) Interxion Frankfurt EU (Ireland) Eircom Clonshaugh EU (Ireland) TelecityGroup, London Docklands' South America (São Paulo) Terremark NAP do Brasil South America (São Paulo) Tivit US East (Virginia) CoreSite NY1 & NY2 US East (Virginia) Equinix DC1 - DC6 & DC10 US West (Northern California) CoreSite One Wilshire & 900 North Alameda, CA US West (Northern California) Equinix SV1 & SV5 US West (Oregon) Equinix SE2 & SE3 US West (Oregon) Switch SUPERNAP, Las Vegas
  • 35.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. VPN vs DirectConnect • Ambos permitem conexão segura entre sua rede e VPC; • VPN é um par de túnel IPSec que trafegará pela Internet; • DirectConnect é conexão dedicada e latência controlada; • Para workloads de alta disponibilidade: Utilizar ambos (failover);
  • 36.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. VPC Flow Logs: Analise seu tráfego Visibilidade da aplicabilidade do Security Group; Fazer troubleshooting de conectividade de rede; Possibilidade de analizar tráfego; Compatível com Amazon GuardDuty.10.10.0.0/16 10.10.1.0/24 AZ A 10.10.2.0/24 AZ B
  • 37.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. VPC Flow Logs data in CloudWatch Logs O que é isso? # dig +short -x 52.90.45.101 ec2-52-90-45-101.compute-1.amazonaws.com. ACCEPT Porta TCP 443 = HTTPS
  • 38.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. VPC endpoints: Amazon S3 and Amazon DynamoDB 10.10.0.0/16 10.10.1.0/24 AZ A 10.10.2.0/24 AZ B S3 bucket Rota para o S3/DynamoDB-VPC endpoint DynamoDB
  • 39.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Direct Connect Gateway • Possibilidade de se utilizar o Direct Connect para se comunicar com outras regiões de forma privada; • Possibilidade de plugar mais de uma VPC em um único Direct Connect;
  • 40.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Recapitulando • VPC; • Subnets Públicas vs Subnets Privadas; • Tabelas de Rota; • VPC VPN vs Direct Connect; • Endpoints na rede privada;
  • 41.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Por favor, participe da pesquisa sobre essa sessão
  • 42.
    © 2018, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Obrigado!