Add IPv6 support#10
Conversation
| ## fd09:24ef:4179::a89/112 - persistent Qubes-Whonix-Gateway IP range | ||
| ## fd09:24ef:4179::a8a/112 - DispVM Qubes-Whonix-Gateway IP range |
There was a problem hiding this comment.
| ## 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 |
| ## 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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Based on https://github.com/QubesOS/qubes-doc/blob/d9a6e20f3a1ad3ca5215059267df099bfecc6728/user/advanced-topics/standalones-and-hvms.rst?plain=1#L258 it does look like /qubes-gateway6 is a real IPv6 address. Adjusting accordingly.
| 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Changed this to use ip and ip6 since the rest of the file seems to do the same.
…ons-IQwcy workflow triggers: normalize to push(master) + pull_request(master) + workflow_dispatch
This pull request adds IPv6 support
Mandatory Checklist
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.