Skip to content
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

Always permit IPv4-mapped IPv6 loopback addresses #342

Merged
merged 1 commit into from
Dec 19, 2024

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