-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Default protocol type for listen addr tcp/0.0.0.0:x
is tcp6
#47
Comments
You can use |
I believe that behavior is set by the kernel if a tcp/ip version is unspecified and the address is ambiguous. (So I'm not particularly surprised in this case.) |
Ok, that all makes sense. I'm going to perform some tests to clarify that even when netstat is reporting |
Alright, I tested this and its accepting tcp4 traffic even when it netstat only lists it as tcp6. Guess this is a non issue, thanks for helping me settle this concern! |
There happens to be an issue here golang/go#48723, which I think may be useful :) |
I've recently started using layer4 to perform some tcp proxying for ingress to some services. Currently our edge is accepting traffic with ipv4 addresses. My caddy file looks like the following.
You'll notice that my listener network addr is default
tcp
and provides the ipv4 catchall addr0.0.0.0
. This configuration would lead me to believe that the socker should open ontcp 0.0.0.0:1010
but what I've found is that it's opening ontcp6 :::1010
.I'm noticing the same behavior on
Ubuntu 16.04.4 LTS
andUbuntu 18.04.5 LTS
. I have not checked onUbuntu 20.*
.I'm running caddy with layer4 as a docker container using
--network-mode=host
from this docker container I've createdThe text was updated successfully, but these errors were encountered: