Isolating Subnets Created in the Same VPC

0

I'm encountering an issue with a specific scenario...

In the past, the architect teams created one VPC, let's call it "VPN-COMMON." Then these architects created subnets inside this VPC, and everything is currently functioning correctly. However, the company now wishes to isolate one of these subnets from another subnet. In essence, they want to separate the "Stage" environment subnet from the "Prod" environment subnet.

I've attempted to create another Network Access Control Lists (NACLs) to stage subnet with inbound and outbound blocking policies within the CIDR of the "Prod" subnet. After that, I ran the reachability analyzer, but unfortunately, it was not successful. Communication between these subnets is still occurring, and the blocking policies that I created were disregarded.

Is there a way to isolate these subnets within the same VPC, or will I need to create another VPC and then migrate my "Stage" environment to this new VPC?

Matheus
질문됨 8달 전483회 조회
2개 답변
1
수락된 답변

This sort of subnet isolation is a common pattern when using a Shared VPC across AWS Accounts, so yes it can also be done within a single account. Typically you'd want better separation between Stage & Prod via separate Accounts and/or VPCs but what you're doing is technically feasible.

How are your NACLs set up? Note that each row has a "Rule #" which defines the order they are checked, smallest number first, stopping on a first match. You'll need a Deny rule for the other subnet that matches early.

전문가
답변함 8달 전
profile picture
전문가
검토됨 8달 전
  • Hello,

    I apologize for the delay in my response. I'd like to clarify the configuration of my Network Access Control Lists (NACLs). They are set up with a deny policy having a lower rule number than the allow policy. Here's an example to illustrate this:

    Rule 101: Deny all traffic to the destinaton IP range 10.250.3.XX/27. Rule 110: Allow all traffic to any destination IP (0.0.0.0/0).

    These rules pertain specifically to my outbound traffic policy.

  • That sounds fine, and this sort of setup definitely works. I guess the next thing to do is double-check everything. Make sure it's your 10.250.3.0 subnet that has the Deny rule for 10.250.3.32, and vice-versa. Make sure there's no other NACL rules with lower rule numbers. Make sure the the NACL assignments to subnets is correct.

  • skinsman,

    You were correct. Upon reviewing the reachability analyzer, I was able to confirm that my destination IP was set to an IP range that was not included in my NACL deny policy. fixing that, my Stage subnet was unable to reach my production subnet. thank you! =)

0

Subnets are not the best boundary to separate or isolate traffic within VPC. Your best option is to create another VPC for complete separation.

profile pictureAWS
전문가
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠