Skip to content

Conversation

zunda
Copy link

@zunda zunda commented Dec 3, 2024

When the server, e.g., Puma binds to unspecified IPv6 address [::] with ,e.g.,:

port ENV.fetch("PORT", 3000), "::"

the server sees the local client connecting from an IPv4-mapped address ::ffff:127.0.0.1. This makes connection to the web console rejected with:

Cannot render console from ::ffff:127.0.0.1! Allowed networks: 127.0.0.0/127.255.255.255, ::1

unless loopback addresses expressed as IPv4-mapped addressses are premitted.

When the server, e.g., Puma binds to unspecified IPv6 address `[::]`
with ,e.g.,:
```ruby, config/puma.rb
port ENV.fetch("PORT", 3000), "::"
```
the server sees the local client connecting from an IPv4-mapped address
`::ffff:127.0.0.1`. This makes connection to the web console rejected
with:
```
Cannot render console from ::ffff:127.0.0.1! Allowed networks: 127.0.0.0/127.255.255.255, ::1
```
unless loopback addresses expressed as IPv4-mapped addressses are
premitted.
@gsamokovarov gsamokovarov merged commit 859bc60 into rails:main Dec 19, 2024
15 of 21 checks passed
@gsamokovarov
Copy link
Collaborator

This is useful, yes. Thank you for your contribution.

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.

2 participants