STATIC ROUTE

VPN IPSec Azure and AWS (Static Route), native resources.

Neste post irei ensinar a configurar uma VPN IPSec entre Azure e AWS de forma nativa com os recursos das Clouds Públicas sem utilizar recursos de Marketplace (Terceiros).

Em nosso cenário temos:

AWS (Região Sao Paulo sa-east-1)
VPC 10.15.0.0/16 (my-vpc-01)
Subnet 10.15.1.0/24 (my-subnet-01)
Route Table (my-routetable-01)
EC2 (my-ec2-)
Security Group (my-sg-01)
Costumer Gateway (my-cgw-01)
Virtual Private Gateway (my-vpg-01)
Site-to-Site Connection (my-con-01)

Azure (Região brazilsouth)
Vnet 10.5.0.0/16 (vnet-vgw-shared-brazilsouth)
Snet 10.5.0.192/26 (GatewaySubnet)
Snet 10.5.1.0.0/24 (snet-vgw-shared-brazilsouth-01)
NSG (NSG-Snet-01)
Virtual Machine (vm-jump-01)
Local Gateway Network (lgw-peer-aws-01)
Connections (con-aws-01)

Vamos a nossa configuração, iremos iniciar pela AWS, não irei criar todos os objetos (ja vimos isso antes), irei focos apenas na configuração.

Nossa VPC

Nossa Subnet

Nosso Route Table

Nossa EC2

Nosso SG (Security Group)

Nosso Costumer Gateway (Static Route)

Nosso VPG com nossa VPC anexada

Nossa conexão Site-to-Site

Agora vamos as configurações, vamos habilitar a propagação de rotas de nosso VPG e adicionar as redes em nosso SG (AWS)

1-) em nosso Route Table

1-) Vamos associar nossa subnet

3-) Em nosso SG, vamos deixar liberadas as conexões de entrada para as redes da AWS 10.15.0.0/16 e rede Azure 10.5.0.0/16

Agora vamos para as nossas configurações no Azure.

Nosso Gateway de VPN

Nosso Local Network Gateway

Nossa Vnet

Agora as configurações

1-) Local Network Gateway
IP do Peer da AWS (aws fornece dois, vamos utilizar somente um) 54.207.82.77
Address Space (rede AWS) 10.15.0.0/16
2-) A conexão, aqui somente precisaremos informar a PSK que encontra-se no arquivo para download na AWS
3-) No NSG no Azure não é preciso fazer nada, pois no Azure o NSG é permissivo (ou seja libera tudo “VirtualNetwork”)
4-) Não é preciso criar routas, pois quando informamos a rede remota em nosso “local gateway network” automaticamente ja é criada a roda para vnet toda, vejam as rotas efetivas na interface da VM em nossa subnet no azure:

Agora nossa conexão no Azure (Status Connected)

Agora nossa conexão na AWS (Status Ativo)

Agora tem conseguimos estabelecer o Tunel VPN, vamos testar a conectividade

Em nossa VM Azure (Windows), vamos testar a conectividade com a rede AWS 10.15.0.0/16

Temos resposta positiva, agora em nossa EC2 na AWS

Nossa EC2

Como mostrado na figura acima temos conectividade com a rede Azure.

Espero ter ajudado.

Referencias
https://aws.amazon.com/pt/blogs/aws-brasil/configurando-uma-conexao-vpn-site-a-site-entre-a-aws-e-o-azure/

https://techcommunity.microsoft.com/t5/fasttrack-for-azure/how-to-create-a-vpn-between-azure-and-aws-using-only-managed/ba-p/2281900

*Obs: Obviamente deixei os recursos de segurança como SG (Security Group AWS) e NSG (Network Security Group Azure) abertos para facilitar o aprendizado, mas em um ambiente de produção, logicamente não deixaremos tudo aberto, somente as portas necessárias.

**Obs: Se houver mais de uma VPC/Vnet que precisam de comunica por este mesmo tunel de VPN, se necessário configurar um transit gateway para este fim, em um próximo post irei criar VPN IPSec entre Azure e AWS, utilizando Transit Gateway, o cenário ficará assim:

AWS sa-east-1 VPC-1 10.128.0.0/24 VPC-2 10.129.0.0/24
Azure brazilsouth Vnet-1 10.130.0.0/24 Vnet-2 10.131.0.0/24

Seja feliz!!!!!!!!!!!!!!!!







Sonicwall with Switch DELL

Scenario

Four dell 5548 switches connected in stacking with default route to 0.0.0.0 / 0 172.17.0.1 172.17.0.2/29 IP and HDMI cables and.
Two dell 6224 switches (Switch CORE) connected with ip 172.17.0.1/29 stacking with default route to 0.0.0.0 / 0 172.17.9.2 (Sonicwall).
Configured within twelve dell 6224 VLANs.
The dell 6224 this routing switch all VLANs without any problem, the big problem was to make the dell 6224 switch to route the packet that he does not know for Sonicwall, was only routing the packets coming from the same vlan Sonicwall other VLANs could not get the Sonicwall.

Solution

In Sonicwall create routes for all VLANs:

Source: Any
Destination: 172.17.0.1/29
Service: Any
Gateway: 171.17.0.1 (CORE DELL Switch 6224)
Interface: X0
Metric: 1

You must manually create a route for each vlan in your environment

VLANS

100    172.17.0.0/29
101    172.17.10.0/27
102    172.17.1.0/25
103    172.17.3.0/26
104    172.17.4.0/28
105    172.17.5.0/25
106    ISP A       
107    ISP B       
108    172.17.6.0/29
109    172.17.7.0/29
110    172.17.8.0/29
111    172.17.9.0/27
112    172.17.2.0/28

image

STATIC ROUTE | MPLS REDUNDANCY

image

SW-SP
ip classless
ip route 172.17.11.0 255.255.255.0 172.17.10.2
ip route 0.0.0.0 0.0.0.0 172.17.10.100
ip route 172.17.11.0 255.255.255.0 172.17.10.5
ip route 172.17.10.0 255.255.255.0 172.17.10.2 5
ip route 172.17.10.0 255.255.255.0 172.17.10.5 10
ip route 128.14.16.176 255.255.255.248 172.17.10.19

SW-RJ
ip classless
ip route 172.17.10.0 255.255.255.0 172.17.11.2
ip route 0.0.0.0 0.0.0.0 172.17.11.100
ip route 172.17.10.0 255.255.255.0 172.17.11.5
ip route 128.14.16.176 255.255.255.248 172.17.10.19