Skip to content

Commit 305726e

Browse files
committed
feat(vpc): started nacl doc
1 parent 408b7d3 commit 305726e

10 files changed

+100
-14
lines changed

pages/vpc/concepts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ When an IPv6-compatible resource is attached to a Private Network, it has a priv
6464

6565
## Network ACL
6666

67-
A VPC's Network **A**ccess **C**ontrol **L**ist is composed of stateless rules to control the flow of traffic between Private Networks. By default, the list contains no rules and therefore traffic is allowed to flow unrestrictedly between the VPC's Private Networks. [Add rules](TODO) to the list to start creating restrictions.
67+
A VPC's Network **A**ccess **C**ontrol **L**ist is composed of stateless rules to control the flow of traffic between Private Networks. By default, the list contains no rules and therefore traffic is allowed to flow unrestrictedly between the VPC's Private Networks. [Add rules](/vpc/how-to/manage-nacl/) to the list to start creating restrictions.
6868

6969
## Private IP address
7070

Binary file not shown.
10.8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17.8 KB
Binary file not shown.
950 Bytes
Binary file not shown.
Binary file not shown.

pages/vpc/how-to/manage-nacl.mdx

Lines changed: 99 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,47 @@ You cannot use NACLs to restrict traffic flow over resources' public network int
2525

2626
2. Click the VPC whose NACL you want to view. The VPC's **Overview** page displays.
2727

28-
TODO SCREENSHOT WITH Network ACL tab highlighted.
28+
<Lightbox src="scaleway-vpc-overview-nacl-highlight.webp" alt="A screenshot of the VPC Overview page in the Scaleway console highlights the Network ACL tab" />
2929

3030
3. Click on the **Network ACL** tab.
3131

3232
- If the list is empty, then no rules have been set and there is currently no restriction on traffic flow within the VPC:
3333

34-
TODO SCREENSHOT
34+
<Lightbox src="scaleway-nacl-empty.webp" alt="A screenshot of the NACL tab in the Scaleway console shows the list has no rules." />
3535

36-
- If you have already added rules to the list, then traffic flow is controlled according to the restrictions they set:
36+
- If you have already added rules to the list, then traffic flow is controlled according to the rules' restrictions:
3737

38-
TODO SCREENSHOT
38+
<Lightbox src="scaleway-nacl-list.webp" alt="A screenshot of the NACL tab in the Scaleway console shows three rules: two with a DENY action, and then the final default rule for ALLOW." />
3939

40-
## How to read and interpet a VPC's NACL
41-
42-
TODO SCREENSHOT
40+
## How to read and interpret a NACL
4341

4442
The following guidance applies when reading a VPC's NACL.
4543

46-
- **IPv4 and IPv6 traffic is filtered separately**. In effect, each VPC therefore has two distinct NACLs: one for IPv4 and one for IPv6. Use the toggle to switch between these lists. You must manage and create rules for each list separately.
44+
### IPv4 and IPv6
45+
46+
<Lightbox src="scaleway-nacl-list-ip.webp" alt="A screenshot of the NACL tab in the Scaleway console highlights the IPv4-IPv6 toggle" />
47+
48+
IPv4 and IPv6 traffic is filtered separately. Each VPC has two distinct NACLs: one for IPv4 and one for IPv6. Use the toggle to switch between these lists. You must manage and create rules for each list separately.
49+
50+
### Rule priority and application
51+
52+
<Lightbox src="scaleway-nacl-list-prio.webp" alt="A screenshot of the NACL tab in the Scaleway console indicates that the topmost rule in the list has the highest priority" />
53+
54+
**Read the list from from top to bottom**. Rules closer to the top of the list are applied first. If traffic matches an NACL rule for an **Allow** or **Deny** action, the action is applied immediately. That traffic is not then subject to any further filtering or any further actions by any rules that follow.
55+
56+
### Statelessness
57+
58+
**NACL rules are stateless**. This means the state of connections is not tracked, and inbound and outbound traffic is filtered separately. Return traffic is not automatically allowed, just because the outbound request was allowed. Explicit rules are required for each direction of traffic.
59+
60+
This means that if you create a rule to allow traffic in one direction, you may also need a separate rule to allow the response in the opposite direction. There is a functionality to auto-generate matching inverse rules for this purpose when creating a new rule.
61+
62+
### NACL default rule
4763

48-
- **Read the list from from top to bottom**. Rules closer to the top of the list are applied first. If traffic matches an NACL rule for an **Allow** or **Deny** action, the action is applied immediately. The traffic is not subject to any further filtering or any further actions by any rules that follow.
64+
<Lightbox src="scaleway-nacl-list-default.webp" alt="A screenshot of the NACL tab in the Scaleway console highlights the default rule at the bottom of the list" />
4965

50-
- **NACL rules are stateless**. This means the state of connections is not tracked and inbound and outbound traffic is filtered separately. Explicit rules are therefore required for each direction of traffic.
66+
**A default rule is auto-generated at the end of the list** This rule is generated at the moment you first start to edit your NACL. It carries out its action on all traffic that did not match any other rule in the list.
5167

52-
- **A default DENY rule is auto-generated at the end of the list** This rule is generated at the moment you first start to edit your NACL. It denies all traffic flow that is not explicitly permitted by the rules above. You can modify or delete this rule if you wish, but if you do then any traffic not explicitly denied by your NACL rules will be allowed to pass.
68+
If you wish, you can modify the default rule to change its action from `DENY` to `ALLOW` (as in the screenshot above). In this case, it allows all traffic that did not match any other rule in the list, to pass.
5369

5470
## How to add rules to a NACL
5571

@@ -59,9 +75,79 @@ The following guidance applies when reading a VPC's NACL.
5975

6076
3. If you are creating your first NACL rule, click **Add rule**, otherwise to add a rule to an existing list, click **Edit rules**.
6177

62-
The NACL list moves into edit mode.
78+
The NACL moves into edit mode.
79+
80+
4. Click **Add rule**. A pop-up displays:
81+
82+
<Lightbox src="scaleway-nacl-add-rule.webp" alt="A screenshot of the Scaleway console shows the 'Add rule' dialog, which is explained in the steps below" />
83+
84+
5. Define the rule to add:
85+
86+
- Select **IPv4** or **IPv6**. Rules for each protocol type must be defined separately (see [above](#how-to-read-and-interpret-a-vpcs-nacl)).
87+
88+
- Select a **protocol** from the drop-down this. Options are `TCP`, `UDP` or `ICMP`. The rule will apply only to traffic matching this protocol. Select `All` if you want it to apply to traffic matching any protocol.
89+
90+
- Define a traffic **source** and **destination**. The rule will apply to traffic originating from this source and being sent to this destination. For both, enter an IP range range in [CIDR format](/vpc/concepts/#cidr-block), and a port or port range. Select **All IPs** and/or **All ports** if you want the rule to apply to traffic to/from any IP or port.
91+
92+
<Message type="tip">
93+
- You **can** use a dash to define a range of ports: `80-100`
94+
- You **can** enter a single port: `80`
95+
- You **cannot** enter multiple distinct ports separated by commas: `80, 84, 99, 100`
96+
- If entering a single IPv4 address, use the `/32` prefix, e.g. `172.16.20.15/32`
97+
- All sources and destinations should be within the Private Networks of the VPC. NACL rules cannot be used to filter traffic to or from a public IP destination.
98+
</Message>
99+
100+
- Select the **action** to take for traffic that matches this rule. Select **Allow** to permit traffic to proceed to its destination, or **Deny** to block traffic from the destination.
101+
102+
- Enter an optional **description** for the rule.
103+
104+
- Choose where to insert this rule into the existing NACL: **add to top** or **add to bottom**. Rules at the top take higher priority and are applied first. You will be able to adjust the position of the rule in the list later.
105+
106+
- Choose whether to **create an inverse rule**. If you tick this box, a matching rule for reverse traffic is auto-created and added to the NACL, where the source and destination are inversed.
107+
108+
6. Click **Add** when you've finished creating your rule.
109+
110+
You are returned to the edit-mode list of your NACL, where the new rule now displays.
111+
112+
7. Click **Save changes** to finalize rule creation. Alternatively, you can continue to add more rules or edit the list. In this case, make all necessary edits and then click **Save changes** when you are done.
113+
114+
## How to edit a NACL
115+
116+
You can edit a NACL at any time, to make the following types of modification:
117+
118+
- Add rules
119+
- Delete rules (except the [default rule](#nacl-default-rule))
120+
- Modify existing rules
121+
- Change the order of rules in the list (except the [default rule](#nacl-default-rule))
122+
123+
1. Click **VPC** in the **Network** section of the [Scaleway console](https://console.scaleway.com/) side menu. The list of your VPCs displays.
124+
125+
2. Click the VPC whose NACL you want to edit, then click the **Network ACL** tab.
126+
127+
3. Click **Edit rules**. The NACL moves into edit mode.
128+
129+
4. Carry out your required action as follows:
130+
- Click **+ Add rule** to add a new rule, and follow the steps [above](#how-to-add-rules-to-a-nacl).
131+
- Click the delete icon <Icon name="delete" /> to delete a rule.
132+
- Click the edit icon <Icon name="edit" /> to edit a rule. Make your edits, then click **Confirm**.
133+
- Use the arrow buttons to [change the order](##rule-priority-and-application) of rules in the list.
134+
135+
<Message type="tip">
136+
137+
After deleting a rule, but before saving your changes (step 5) you can use the **Restore rule** button to undo the deletion.
138+
<Lightbox src="scaleway-nacl-restore.webp" alt="A screenshot from the Scaleway console shows the restore rule icon" />
139+
140+
</Message>
141+
142+
5. Click **Save changes** to finalize the changes you have made.
143+
144+
145+
146+
147+
148+
63149

64-
4. Click **Add rule**
150+
65151

66152

67153

0 commit comments

Comments
 (0)