mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #155] How to use Docker DNS to resolve other containers in compose #142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chb0github on GitHub (Jul 20, 2019).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/155
I am trying to setup something pretty simple in a compose - although it's for a minecraft server, it really could apply to anything so hopefully someone can explain how I can overcome this.
I am trying to use the native docker DNS in a compose so that those who join the VPN can resolve any of the other containers but it's evading me how since the VPN creates another interface which is where all the traffic is going (and straight out to the internet).
Below is my compose, the idea is: connect to the vpn and set your minecraft server to "minecraft" as the host, and you're done.
@hwdsl2 commented on GitHub (Jul 23, 2019):
@chb0github Hello! I see that you are using the correct approach, which involves setting
VPN_DNS_SRV1to your Docker DNS server. You can find more information here [1] [2]. Alternatively you can put the DNS server's hostname in yourenvfile [3].However, after resolving the DNS, due to Docker's network isolation among containers, I think it is difficult to reach other containers while connected to the IPsec VPN.
[1] https://github.com/hwdsl2/docker-ipsec-vpn-server/pull/95
[2]
github.com/hwdsl2/docker-ipsec-vpn-server@d4936ab90d[3] https://github.com/hwdsl2/docker-ipsec-vpn-server#advanced-usage
@TheAnachronism commented on GitHub (Apr 26, 2021):
Has there been any progress on this?
I'd like to do something very similar...