A Site-to-Site VPN tunnel goes down every few hours and comes back only when on-prem sends traffic.
AdvancedTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer
Likely causes → Rekey or DPD mismatches. AWS's side waits for the customer gateway to initiate by default; if the tunnel idles and DPD times out (or a rekey fails because of lifetime/proposal mismatch), the tunnel drops and nobody re-initiates until on-prem traffic appears.
Diagnose →
aws ec2 describe-vpn-connections --vpn-connection-ids <vpn> \
--query 'VpnConnections[0].Options.TunnelOptions[].[DpdTimeoutAction,StartupAction,Phase1LifetimeSeconds,Phase2LifetimeSeconds]'
# CloudWatch tunnel logs: look for DPD timeout or rekey failures before each drop
Fix → Set DpdTimeoutAction=restart and StartupAction=start on the AWS side so AWS re-initiates, match phase 1/2 lifetimes with on-prem, and enable DPD on the customer gateway.
Prevent → Alarm on TunnelState per tunnel, run both tunnels active with BGP, and keep a lightweight keepalive (e.g. a monitoring ping across the tunnel).
More on Cloud networking: VPC, firewalls, NAT, VPN and proxies
An EC2 instance in a private subnet hangs on `apt-get update` at `Connecting to archive.ubuntu.com`.BeginnerA new EC2 instance in a "public" subnet can't be reached over SSH from the internet; the SG allows port 22 from your IP.BeginnerThe SG allows inbound 443 and the app works from inside the VPC, but internet clients time out. The subnet NACL allows inbound 443.IntermediateA VPC peering connection is `Active`, but instances in the two VPCs can't ping each other.BeginnerALB targets are `unhealthy` with reason `Target.Timeout`, and VPC Flow Logs show `REJECT` from the ALB's IPs to the instances.BeginnerTwo VPCs are attached to a Transit Gateway, but traffic between them fails.Intermediate