hudra0 / qosmate

GNU General Public License v3.0
41 stars 7 forks source link

IPv6 Addresses - Error: Could not resolve hostname: Name has no usable address #1

Closed Fail-Safe closed 3 months ago

Fail-Safe commented 3 months ago

Given the following rule in /etc/config/qosmate, I receive the error below:

config rule
    option name 'NextDNS6'
    option proto 'tcp'
    list dest_ip '2001:19f0:5401:1d93:5400:2ff:fece:25e9'
    list dest_ip '2605:380:57:613::5'
    list dest_ip '2605:6c80:1:60::'
    list dest_ip '2605:a880:0:7b:0:1:54d:2215'
    list dest_ip '2a00:11c0:39:353::3'
    list dest_ip '2a01:4ff:f0:ac5::1'
    list dest_ip '2a07:a8c0::'
    list dest_ip '2a07:a8c1::'
    list dest_ip '2a0b:4342:1a32:f:5054:ff:fe48:d17f'
    list dest_ip '2a0e:6902:2002:12b:5054:ff:fed7:6b78'
    list dest_port '443'
    option class 'cs5'
    option counter '1'
    option enabled '1'

Error:

...
Automatically including '/usr/share/nftables.d/ruleset-post/dscptag.nft'
In file included from /dev/stdin:6562:1-57:
/usr/share/nftables.d/ruleset-post/dscptag.nft:121:30-67: Error: Could not resolve hostname: Name has no usable address
 meta l4proto tcp ip daddr { 2001:19f0:5401:1d93:5400:2ff:fece:25e9,2605:380:57:613::5,2605:6c80:1:60::,2605:a880:0:7b:0:1:54d:2215,2a00:11c0:39:353::3,2a01:4ff:f0:ac5::1,2a07:a8c0::,2a07:a8c1::,2a0b:4342:1a32:f:5054:ff:fe48:d17f,2a0e:6902:2002:12b:5054:ff:fed7:6b78 } th dport 443 ip dscp set cs5 counter comment "NextDNS6";
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I believe ip daddr will need to be ip6 daddr for IPv6 destination addresses.

hudra0 commented 3 months ago

Hey man, thanks for pointing out the error.

I believe ip daddr will need to be ip6 daddr for IPv6 destination addresses.

You were totally right! Good catch!

I’ve made some changes (including updates to the ui validation) and pushed them to the repo. Should be working now

Just run:

service qosmate update

...and the update process should kick off. To see the changes in the UI, you might need to clear your browser cache.

Fail-Safe commented 3 months ago

You nailed the issue. I was able to confirm after the update that my rule was processed correctly and syntactically happy with fw4. Thanks for the super-fast turnaround on that issue!