mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #102] Unable to set own dns (pihole) server #90
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 @axeII on GitHub (Nov 23, 2018).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/102
I am running docker container ipsec-vpn-server latest version. I am also running pihole in other docker container.
What I am trying to achieve is to set dns server as the pihole. Both suppose to run on same machine but in different container.
I tried to setup config file
vpn.envas:But it's not working! I am still getting ads on devices when I am connected via VPN.
Any advice what could help or what's wrong? Thanks
@hwdsl2 commented on GitHub (Nov 23, 2018):
@L3rchal Hello! I am not familiar with pihole. Does it expose any port (e.g. UDP 53) on your Docker host? If it does, trying setting
VPN_DNS_SRV1to your Docker host’s public (or if behind NAT, private) IP. You’ll need to recreate the Docker container after modifyingvpn.env.If that doesn’t work try setting it to the private IP of the pihole Docker container.
@axeII commented on GitHub (Nov 26, 2018):
Ok solved. I solved issue by adding parameter
--net=host. With this way I am able to cooperated with the other container running pihole. I also had to setup to private address to make this work.On the other hand when running new container this way there is this line:
WARNING: Published ports are discarded when using host network mode...
Should this be my concern?
Anyway it's working now, feel free to close this.
@hwdsl2 commented on GitHub (Nov 26, 2018):
@L3rchal Glad to hear you got it working! It looks like that the warning message is saying that although the Docker container exposes (publishes) UDP ports 500 and 4500 (in the Dockerfile), they are "discarded" because using
--net=hostalready "exposes" all ports on the host to the Docker container.@hadalin commented on GitHub (Mar 12, 2019):
I also had issues with this. What worked for me was changing a setting via Pi-Hole web interface:
Settings>DNS>Interface listening behavior>Listen on all interfaces.@michaeldavie commented on GitHub (Aug 9, 2019):
@axeII or @hadalin, would you be willing to share your configs for this setup? I'm trying to do the same thing, but I'm stuck. I see the queries reaching the Pi-Hole, but the responses don't seem to be making it back to the device connecting through the VPN. Thanks for your help.
@axeII commented on GitHub (Aug 10, 2019):
@michaeldavie Hmm did you set vpn-dns ip to private ip address of your pihole machine instead of
localhost? I remember thatlocalhostwasn't working for me. Hence my config as my pihole machine ip is10.0.0.120@michaeldavie commented on GitHub (Aug 11, 2019):
Thanks. The DNS server setting is making it through to the client, and the queries are reaching the Pi-Hole, but the responses don't seem to be making it back. Did you have to make any changes to the
iptablesconfiguration to get this to work?