Skip to content

Commit

Permalink
fix: enables bridge-nf-call-iptables by default (#539)
Browse files Browse the repository at this point in the history
Issue #, if available: #538

*Description of changes:*

Enables `net.bridge.bridge-nf-call-iptables` by default in `sysctl`.
This will [send packets in a bridge network to iptables for
processing](https://wiki.libvirt.org/Net.bridge.bridge-nf-call_and_sysctl.conf.html).

This will also fix the warning on `finch info`:
```
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
```

*Testing done:*

1. `finch info`
1. Inspected `/etc/sysctl.d/99-lima.conf` to ensure all of the expected
fields are there
1. Reproduced #538 against my
local Finch, and it succeeded.

**To discuss:** is it worth creating a new sysctl config file instead of
appending to `/etc/sysctl.d/99-lima.conf`?

- [x] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Sam Berning <[email protected]>
  • Loading branch information
sam-berning authored Aug 23, 2023
1 parent bbdd782 commit 6ea1499
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions finch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ provision:
- mode: boot
script: |
modprobe virtiofs
- mode: boot
script: |
modprobe br_netfilter
cat <<EOF > /etc/sysctl.d/99-finch.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
EOF
sysctl --system
# # `user` is executed without the root privilege
- mode: user
script: |
Expand Down

0 comments on commit 6ea1499

Please sign in to comment.