Skip to content

Add IPv6 support #10

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Add IPv6 support #10

wants to merge 6 commits into from

Conversation

DanWin
Copy link
Contributor

@DanWin DanWin commented Oct 11, 2024

This pull request adds IPv6 support

Mandatory Checklist

  • Legal agreements accepted. By contributing to this organisation, you acknowledge you have read, understood, and agree to be bound by these these agreements:

Terms of Service, Privacy Policy, Cookie Policy, E-Sign Consent, DMCA, Imprint

Optional Checklist

The following items are optional but might be requested in certain cases.

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Comment on lines +217 to +218
## fd09:24ef:4179::a89/112 - persistent Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a8a/112 - DispVM Qubes-Whonix-Gateway IP range

Choose a reason for hiding this comment

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

Suggested change
## fd09:24ef:4179::a89/112 - persistent Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a8a/112 - DispVM Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a89:/112 - persistent Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a8a:/112 - DispVM Qubes-Whonix-Gateway IP range

@@ -39,18 +39,21 @@ variables_defaults() {
## Would fail if netvm is set to 'none',
## which is the case in Qubes R4 TemplateVMs.
[ -n "${GATEWAY_IP:-}" ] || GATEWAY_IP="$(qubesdb-read /qubes-gateway 2> /dev/null)" || GATEWAY_IP="127.0.0.1"
[ -n "${GATEWAY_IP6:-}" ] || GATEWAY_IP6="::ffff:$(qubesdb-read /qubes-gateway6 2> /dev/null)" || GATEWAY_IP6="::1"

Choose a reason for hiding this comment

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

Maybe I misunderstood something, but I was under the impression that the /qubes-gateway6 qubesdb entry contained an IPv6 address. This looks like it's being used as an IPv4 address though.

Comment on lines 337 to +343
if [ -n "$SYSTEMCHECK_USER" ]; then
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr 127.0.0.1 counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" ip daddr 127.0.0.1 counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" ip6 daddr ::1 counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP" counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP6" counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP_HARDCODED" counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP6_HARDCODED" counter accept

Choose a reason for hiding this comment

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

How come the loopback address rule had the inet part split into ip and ip6, but the GATEWAY_IP(6) and GATEWAY_IP_HARDCODED(6) rules weren't?

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