Docker container networking issues


xorinzor

Recommended Posts

I have setup my squid-proxy container to connect to my VPN by using the extra parameter:

--net="container:vpn"

In combination with Network-type: none, to make sure no data leaks to the public connection outside of the VPN.

Which works absolutely great, but one issue I've run into is that if, for whatever reason, I need to restart my VPN container the connection won't be re-established between these containers.

 

I'll have to make sure to restart the squid-proxy container after this as well. And if both are stopped, I need to make sure that the VPN container is started before the squid-proxy container is started in order for the connection to be established.

 

Not being very experienced with docker, I'm wondering if there is a better way of doing this. Or perhaps a way of doing the same thing, where the connection will be automatically re-established if it detects that the container has started again.

Edited by xorinzor
Link to comment
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.