Comments (5)
Your config looks correct here. I actually run a similar setup for my own home network using a pihole container.
I've networked both wg-access-server and pihole within a shared docker-network. I expose the containers using standard port binding i.e. --port 53:53
.
When I change my configuration to use the pihole's LAN ip rather than it's docker network hostname (i.e. to match your config) I get the same error.
I'll do some digging and see what I can find.
from wg-access-server.
From running a tcpdump sudo tcpdump -i any -n udp port 53
on my docker host I can see a difference in routing between the two approaches.
When attaching wg-access-server and pihole to a shared docker network (i.e. docker network create
) and using their docker-network IPs (or hostnames):
# wg-access-server is `172.18.0.2`
# pihole is `172.18.0.4`
14:53:07.442081 IP 172.18.0.2.49694 > 172.18.0.4.53: 5217+ A? www.msftconnecttest.com. (41)
14:53:07.442180 IP 172.18.0.2.49694 > 172.18.0.4.53: 5217+ A? www.msftconnecttest.com. (41)
# ...
14:53:07.462756 IP 172.18.0.4.53 > 172.18.0.2.49694: 5217 4/0/0 CNAME v4ncsi.msedge.net., CNAME ncsi.4-c-0003.c-msedge.net., CNAME 4-c-0003.c-msedge.net., A 13.107.4.52 (139)
14:53:07.462801 IP 172.18.0.4.53 > 172.18.0.2.49694: 5217 4/0/0 CNAME v4ncsi.msedge.net., CNAME ncsi.4-c-0003.c-msedge.net., CNAME 4-c-0003.c-msedge.net., A 13.107.4.52 (139)
When using pihole's LAN ip address from wg-access-server
# wg-access-server is 172.17.0.3
# pihole is 192.168.0.50
14:48:31.943458 IP 172.17.0.3.46070 > 192.168.0.50.53: 21285+ A? www.msftconnecttest.com. (41)
14:48:31.943913 IP 172.17.0.1.34227 > 172.17.0.8.53: 21285+ A? www.msftconnecttest.com. (41)
# ...
14:48:31.964630 IP 172.17.0.8.53 > 172.17.0.1.34227: 21285 4/0/0 CNAME v4ncsi.msedge.net., CNAME ncsi.4-c-0003.c-msedge.net., CNAME 4-c-0003.c-msedge.net., A 13.107.4.52 (139)
14:48:31.964989 IP 172.17.0.1.53 > 172.17.0.3.46070: 21285 4/0/0 CNAME v4ncsi.msedge.net., CNAME ncsi.4-c-0003.c-msedge.net., CNAME 4-c-0003.c-msedge.net., A 13.107.4.52 (139)
I think this shows the issue. When using the LAN IP docker's networking breaks DNS responses coming back to wg-access-server. The DNS response is expected from 192.168.0.50:53
but wg-access-server sees a response from 172.17.0.1:53
.
wg-access-server logs an i/o timeout because as far as it's concerned it never received a reply from 192.168.0.50:53
.
I believe this is the root cause; i'll need to skill up a bit on the fundamentals at play here in regards to docker's networking to figure out a solution.
from wg-access-server.
Given I don't have a solution for you yet I recommend placing your vpn + dns containers in the same docker network and then using the dns server's hostname rather than it's LAN ip to connect (so that wg-access-server connects to it via the shared docker-network)
from wg-access-server.
sounds like good advice, I'll give it a try asap. Thanks for digging that deep into the issue. I'll close the issue for now.
from wg-access-server.
I recommend placing your vpn + dns containers in the same docker network
Sorry to jump in and reopen the issue, but I attempted to follow this advice. When I did so in a single docker compose, I found that wg-access-server would use port 53, preventing pi-hole from launching, so I couldn't run both in the same container. Sometimes it would be the opposite way around, with pi-hole launching but wg-access-server not, but either way the only way I saw to fix it was to place them in separate docker-composes and therefore in separate docker networks. Any updates on the underlying issue of not receiving a reply from the correct ip? I also tried setting the upstream ip to that of the dns filter's docker network as it appears to the host (instead of that of the host itself), but no dice.
from wg-access-server.
Related Issues (20)
- the input device is not a TTY
- Initial VPN
- Cannot parse endpoint from wireguard android app HOT 2
- Control trafic user HOT 2
- [Feature request] label outdated devices HOT 1
- doc / feature to port forward in yaml rules ? HOT 1
- Disable basic auth at all HOT 3
- Fresh install on Kubernetes cant access services
- Fresh install on Kubernetes cant access services HOT 2
- how to use grpc?
- Can this app be used with an existing wireguard?
- How can I continue to see the transmission flow of each Peer on the management page?
- Running on Mac M2 HOT 1
- OIDC Azure issue HOT 3
- How to configure Docker's NAT? HOT 1
- linux/arm64/v8 HOT 1
- can't initialize iptables table `filter': Table does not exist HOT 1
- Help! HOT 1
- Need to change DNS address and DHCP SERVER. HOT 1
- Type: <b>Feature Request</b>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wg-access-server.