Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bastille0 loopback IPv6 support #727

Closed
wants to merge 3 commits into from

Conversation

foudfou
Copy link

@foudfou foudfou commented Nov 3, 2024

This PR makes sure that, for jails created with

bastille create xxx 14.1-RELEASE '192.168.100.117/24 2001:db8:ee00:ff00::117/64'
  1. All IPs (ip4 and ip6, and not their subnet) added into/removed from the <jails> pf table
  2. pf rdr rules for ip6 are present

ips=$(bastille config "${_jail}" get ip4.addr)
ips="${ips} $(bastille config "${_jail}" get ip6.addr)"
for ip in ${ips}; do
ip=$(printf "$ip" | sed -E 's,/[0-9]+,,')
Copy link
Author

Choose a reason for hiding this comment

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

pfctl -t jails -Tadd <IP>/<CIDR> actually adds the network, not the IP.

@foudfou
Copy link
Author

foudfou commented Nov 4, 2024

Oh I realized there was a PR #386 for the exact same issue #385 a couple of years back.

@bmac2
Copy link
Collaborator

bmac2 commented Dec 16, 2024

@foudfou this one has conflicts also. Please clean up so I can test.

@foudfou
Copy link
Author

foudfou commented Dec 17, 2024

@bmac2 rebased.

@foudfou
Copy link
Author

foudfou commented Dec 17, 2024

@bmac2 rebased again 😁

@bmac2
Copy link
Collaborator

bmac2 commented Jan 9, 2025

@foudfou one more rebase please. Will try to get this one reviewed and merged before needing another rebase. :-)

@foudfou
Copy link
Author

foudfou commented Jan 12, 2025

Sorry @bmac2 I won't be able to work on this for a while. Feel free to close.

@tschettervictor
Copy link
Collaborator

tschettervictor commented Feb 3, 2025

This is integrated with #765 and #830 anyway. So we can close this.

@bmac2
Copy link
Collaborator

bmac2 commented Feb 3, 2025

Closing as the content of this PR is included in #830

@bmac2 bmac2 closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants