-
Notifications
You must be signed in to change notification settings - Fork 373
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
Transparent mode using docker (option 1 and 2): common.c:268:setsockopt IP_TRANSPARENT: Permission denied
or 0.0.0.0:443:bind: Permission denied
#424
Comments
common.c:268:setsockopt IP_TRANSPARENT: Permission denied
common.c:268:setsockopt IP_TRANSPARENT: Permission denied
or 0.0.0.0:443:bind: Permission denied
Did you give sslh the appropriate CAP_NET_RAW and CAP_NET_BIND_SERVICE capabilities? |
Yes I did. Both capabilities. This is why I opened an issue.
I am using Oracle Linux 8, with nftable (default on multiple Centos based distro) and docker.
Do you have any other idea to debug?
Thanks 🙏
|
Yes: run |
Still same error:
docker-compose.yml
Nothing is using the 443 port:
|
[EDIT: REMOVED] |
Found the issue:
Full docker-compose.yml
|
Issue solved, as I don't have anymore a bind error. I must have an iptables issue somewhere: from internet I can't connect to https services (connection reset), but from the host usint cURL, traefik handle correctly the request (through sslh).🤔 |
According to your last discussion about going transparent mode (#454), I tried the solution (https://github.com/yrutschle/sslh/blob/master/doc/simple_transparent_proxy.md). On CentOS 8 (Oracle Linux), it is slightly different:
The container now starts but packets are not routed when coming from internet or localhost:
|
Currently I am stuck at this point @yrutschle, I don't know what to do. To summarize:
docker-compose.yml
|
Just seeing this issue. You are merging two methods of transparency. In your interface configuration you prepare for the iproute2-only solution with dummy-interface, but in your container log the old iptables-marking method and 127.0.0.1 is used. This said, as the new iproute2-only configuration option is currently not included in almost all recipes or packages. And: If you wish to use IPV6, you need a unique IPV6 address on dummy0 as well, and the according routing rules for the new recipe. |
Thanks a lot for your time and answer. I will check all again on my new server as soon as I can :) |
Hello,
I am crawling this repo to find a solution for hours, but I found no answers to my case.
After trying both solutions 1 and 2 for deploying SSLH in transparent mode, and using docker, I always have an error:
Either it's
common.c:268:setsockopt IP_TRANSPARENT: Permission denied
(option 1) or0.0.0.0:443:bind: Permission denied
(option 2, and nothing is using this port).I even tried to add
privileged: true
, but still the same problem.Few details about my server:
user remap
, but I specifically disable this configuration for SSLH container. So aroot
user in that container has realroot
rights on the host OS.I don't know what to do, I am out of debug ideas 😢
What did I miss? It is a bug or just a misconfiguration from my side?
Thanks a lot for your time and help! 🙏
docker-compose.yml for transparent mode, option 1
When starting docker I have an error after few seconds:
docker-compose.yml for transparent mode, option 2
Error logs for binding the port 443:
The text was updated successfully, but these errors were encountered: