Conversation
| switch p.UserType { | ||
| case api.UserTypeIBRL: | ||
| err = createBaseTunnel(s.nl, tun) | ||
| err = createTunnelWithIP(s.nl, tun, p.DoubleZeroIP) |
There was a problem hiding this comment.
I'm concerned about solving this by just applying the detected public IP to the tunnel interface. If their app is only listening to the RFC1918/whatever address is behind the NAT, they're going to bring up their tunnel and we'll potentially break them because traffic is now coming in destined to an address they're not listening on.
There was a problem hiding this comment.
Yes, it requires applications to bind to 0.0.0.0, but isn't that the nature of the beast? Also I think "break them" is too strong, because wouldn't they have to make some other change external to this client update to send traffic to the public IP?
I can't think of a way to solve for that other than documentation and support. Any ideas?
There was a problem hiding this comment.
Yes, it requires applications to bind to 0.0.0.0, but isn't that the nature of the beast?
What do you mean nature of the beast? In the current IBRL mode, we don't require users to do that.
Also I think "break them" is too strong, because wouldn't they have to make some other change external to this client update to send traffic to the public IP?
The situation I'm worried about is:
- An app behind a 1:1 NAT is listening on their RFC1918 address, not all interfaces
- There are 10 other hosts connected to DZ communicating with this app via it's public IP behind 1:1 NAT
- The app gets connected to DZ, and it's public IP is advertised into DZ
- The 10 other hosts now attempt to reach the app via DZ
- Traffic ends up getting dropped in the kernel where this app is running because the app's listening socket is not bound to this address
There was a problem hiding this comment.
What do you mean nature of the beast?
I should have said: "Yes, it requires applications to bind to 0.0.0.0, but is there any other way to do multihoming properly?"
I get the concern, but it doesn't seem like an unreasonable caveat to me. Am I missing something?
There was a problem hiding this comment.
"Yes, it requires applications to bind to 0.0.0.0, but is there any other way to do multihoming properly?"
We could handle the 1:1 NAT for the user on the doublezero0 interface via something like tc. This way it doesn't matter what address the app is bound to and there's no risk we break their application when they connect to DZ.
Summary of Changes
Testing Verification
python3 -m http.server, which continues to accept inbound traffic over doublezero0 after a doublezerod restart