Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions templates/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ minimumLimaVersion: 2.0.0
# EXPERIMENTAL
# Default settings can be imported from base templates. These will be merged in when the instance
# is created, and the combined template is stored in the instance directory.
# This setting can be either a single string (URL), or a list of locators.
# This setting ca be either a single string (URL), or a list of locators.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

# A locator is again either a string (URL), or an object with "url" and "digest" properties, e.g.
# base: [{url: ./base.yaml, digest: decafbad}, …]
# The "digest" property is currently unused.
Expand Down Expand Up @@ -489,9 +489,13 @@ networks:
# # default: guestPortRange: [1, 65535]
# # default: hostPortRange: [1, 65535]
#
# - guestIP: 0.0.0.0 # otherwise defaults to 127.0.0.1
# proto: any # tcp and udp
# ignore: true # don't forward these ports (guestPortRange, in this case 1-65535)
# To disable all dynamic TCP/UDP forwarding (while keeping SSH available via `limactl shell`),
# use a single ignore rule.
# portForwards:
# - guestIP: 0.0.0.0
# guestIPMustBeZero: false # ensures 0.0.0.0 matches any guest interface
# proto: any
# ignore: true
#
# - guestPort: 7443
# guestIP: "0.0.0.0" # Will match *any* interface
Expand Down
16 changes: 15 additions & 1 deletion website/content/en/docs/config/port.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,18 @@ The benchmark result, especially the throughput of vzNAT, highly depends on the
- Hardware: MacBook Pro 2024 (M4 Max, 128 GiB)

</p>
</details>
</details>

## Disable all port forwarding

To disable all dynamic TCP and UDP port forwarding, add a single ignore rule to your instance configuration. SSH access via `limactl shell` continues to work.

```yaml
portForwards:
- guestIP: 0.0.0.0
guestIPMustBeZero: false
proto: any
ignore: true
```

On Lima versions prior to 2.0, omit the `guestIPMustBeZero` field (the rule still works without it).
Loading