Because of this problem, I'm not able to use the VPN on my host machine and have access to the internet on the containers at the same time. To solve the problem, I want to run a container with access to the VPN and redirect requests from my host to this container.
Disclaimer : I'm not a network manager and I don't understand completly everything.
I was able to use the VPN inside a container by using stono/ike. My idea was to use socat to redirect requests. Here is the command is use :
docker run --rm -it --privileged -v ~/.ike/sites:/sites --userns host stono/ike typ username password # run the container docker inspect <container-id> | grep IPAddress # To get the IP address of the container sudo socat UDP-LISTEN:500,fork,reuseaddr UDP:172.17.0.2:500 # redirects the port 500 sudo socat UDP-LISTEN:4500,fork,reuseaddr UDP:172.17.0.2:4500 # redirects the port 4500
All commands succed but I still not able to have access to the VPN with my host machine.
So, what can I do? Am I on the good way and what's the solution?