Skip to content

Firewall issue in Node v17+ #43

@bensalilijames

Description

@bensalilijames

In Node 17+, making requests to *.meh domains from within Node (e.g. via built-in fetch) is failing with Error: connect ECONNREFUSED ::1:443.

Turns out that Node 17 changes the default sorting order for DNS records so that IPv4 records are no longer sorted ahead of IPv6 by default: nodejs/node#39987

So instead of using 127.0.0.1, requests now resolve to ::1 as the default behaviour.

The cause of the failed requests (at least on MacOS) seems to be this line in meh.firewall.plist: if I change 127.0.0.1 to ::1 it appears to all go back to a working state, however, I'm not smart enough to understand why, so I'm hesitant to make a PR suggesting a change! But it looks to be something with the firewall rule not forwarding traffic in an IPv6 friendly way.

Hope that's useful! 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions