Name-based routing to s3 bucket websites doesn't work #1506

Open
opened 2025-11-20 05:31:51 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @samroweemployinc on GitHub (Dec 18, 2024).

Describe the problem

We have an S3 bucket with a "simple website" interface which is behind a blah.s3-website-us-west-1.amazonaws.com DNS name. We've tried to create a name-based route for it, but it doesn't work and we see IPv6 addresses show up in it, which I don't think can work over Netbird. "Doesn't work" means that sometimes our IP restrictions give a 403 and sometimes they don't. We enabled logging on the bucket and saw that all of the 403s came directly from my ISP IP and all of the 200s came from the NB Peer as expected.

One final thing we noticed was that the IP list for that name-based-route just grows and grows despite "Keep Routes" being turned on in the n-b-r.

To Reproduce

Steps to reproduce the behavior:

  1. Create an s3 simple site and allow only private IPs via BucketPolicy ( "Condition": {"IpAddress": {"aws:SourceIp": [...
  2. Create a name-based route for that site
  3. curl a file from it over and over and sometimes get a 403 and sometimes get 200

Expected behavior

The route should be used consistently. IPv6 addresses shouldn't be in the list.

Are you using NetBird Cloud?

Self Host

NetBird version

0.34.1

Originally created by @samroweemployinc on GitHub (Dec 18, 2024). **Describe the problem** We have an S3 bucket with a "simple website" interface which is behind a `blah.s3-website-us-west-1.amazonaws.com` DNS name. We've tried to create a name-based route for it, but it doesn't work and we see IPv6 addresses show up in it, which I don't think can work over Netbird. "Doesn't work" means that sometimes our IP restrictions give a 403 and sometimes they don't. We enabled logging on the bucket and saw that all of the 403s came directly from my ISP IP and all of the 200s came from the NB Peer as expected. One final thing we noticed was that the IP list for that name-based-route just grows and grows despite "Keep Routes" being turned on in the n-b-r. **To Reproduce** Steps to reproduce the behavior: 1. Create an s3 simple site and allow only private IPs via BucketPolicy ( `"Condition": {"IpAddress": {"aws:SourceIp": [...` 2. Create a name-based route for that site 3. curl a file from it over and over and sometimes get a 403 and sometimes get 200 **Expected behavior** The route should be used consistently. IPv6 addresses shouldn't be in the list. **Are you using NetBird Cloud?** Self Host **NetBird version** 0.34.1
saavagebueno added the waiting-feedbacktriage-needed labels 2025-11-20 05:31:51 -05:00
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @samroweemployinc,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @samroweemployinc, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@samroweemployinc commented on GitHub (May 19, 2025):

Unfortunately we're not able to use the latest versions of Netbird because we don't have a single nameserver that can answer across all of our networks.

@samroweemployinc commented on GitHub (May 19, 2025): Unfortunately we're not able to use the latest versions of Netbird because we don't have a single nameserver that can answer across all of our networks.
Author
Owner

@mlsmaycon commented on GitHub (May 19, 2025):

Hello @samroweemployinc I'm not sure I got it. The latest version would require a routing peer routing traffic to your bucket domain. With recent versions we've added a few DNS improvements, like TCP listener to ensure DNS queries with large responses, like the bucket ones, are handled by the client.

@mlsmaycon commented on GitHub (May 19, 2025): Hello @samroweemployinc I'm not sure I got it. The latest version would require a routing peer routing traffic to your bucket domain. With recent versions we've added a few DNS improvements, like TCP listener to ensure DNS queries with large responses, like the bucket ones, are handled by the client.
Author
Owner

@samroweemployinc commented on GitHub (Aug 20, 2025):

@mismaycon Sorry for the delay. Perhaps we've misunderstood but since moving DNS resolution to the peers we've been under the impression that we can't upgrade, so all of our clients are on 0.34.1. Do we have the wrong idea that we need a single DNS server that can answer all questions?

Our company has several acquisitions that have their own private DNS servers/Route53 that know nothing about each other so if I'm on multiple routes, how does NB know which peer to use to resolve a given name?

I'd love it if we're wrong about this.

@samroweemployinc commented on GitHub (Aug 20, 2025): @mismaycon Sorry for the delay. Perhaps we've misunderstood but since moving DNS resolution to the peers we've been under the impression that we can't upgrade, so all of our clients are on 0.34.1. Do we have the wrong idea that we need a single DNS server that can answer all questions? Our company has several acquisitions that have their own **private** DNS servers/Route53 that know nothing about each other so if I'm on multiple routes, how does NB know which peer to use to resolve a given name? I'd love it if we're wrong about this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1506