tsaikd / docker-openvpn

MIT License
5 stars 4 forks source link

The server side does not set dns resolver in client file #5

Open Whisper40 opened 3 years ago

Whisper40 commented 3 years ago

The documentation specifies this test to check if the container is using the vpn connection :

$ apk add --no-cache curl
$ curl http://ifconfig.io

But if you follow exactly the documentation, you can see that your docker client container does not contains a dns to resolve the address. So it will not work. If you set the dns manually, it will works.

I know that we can put an option for dns resolver in the client file. So i think that it should be in by default when creating user file.

To reproduce Create a server side vpn Create a client file Create a client container and use the client file. In the openvpn container you go to /etc/resolv.conf and see that there is no dns resolver

A temporary bad solution can be to set dns: 1.1.1.1 in the docker-compose.

tsaikd commented 3 years ago
Whisper40 commented 3 years ago

I don't understand someting there :

push "dhcp-option DNS 8.8.4.4"
push "dhcp-option DNS 8.8.8.8"

You set the dns option, so why the client does not receive the dns config ?

Something related ? https://superuser.com/a/849730