Hi everyone,
I have a problem regarding access other container when deploy tailscale as a docker container. To be specifically, I am setting up a Virtual machine on Oracle cloud and using docker compose to deploy 3 container:
- Adguard
- Wireguard
- Taiscale
My purpose is I want to use adguard container act as a private dns server and other 2 containers will resolve dns request from adguard container. I did create a private network and assigned each container with their own prive ip adress ie: - Adguard = 10.2.0.100
- Wireguard = 10.2.0.3
- Taiscale = 10.2.0.2
Then point dns (2),(3) to (1) and it works.
But the problem is I cannot access adguard home page while connecting via tailcale. In contrast, it works properly when connecting via wireguard.
Enclosed herewith is my docker compose file for your reference. Please suport if you’ve got experience in this issue.
version: "3.8"
networks:
private_network:
ipam:
driver: default
config:
- subnet: 10.2.0.0/24
services:
wg-easy:
depends_on: [adguard]
environment:
# ⚠️ Required:
# Change this to your host's public address
- WG_HOST=
# Optional:
- PASSWORD=
# - WG_PORT=51820
# - WG_DEFAULT_ADDRESS=10.8.0.x
- WG_DEFAULT_DNS=10.2.0.100
- WG_PERSISTENT_KEEPALIVE=25
# - WG_MTU=1420
# - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24
image: weejewel/wg-easy
container_name: wg-easy
volumes:
- .:/etc/wireguard
ports:
- "51820:51820/udp"
- "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
networks:
private_network:
ipv4_address: 10.2.0.3
tailscale:
depends_on: [adguard]
container_name: tailscaled
image: tailscale/tailscale:stable
restart: unless-stopped
#privileged: true
#command: tailscaled
volumes:
- "/var/lib:/var/lib"
- "/dev/net/tun:/dev/net/tun"
networks:
private_network:
ipv4_address: 10.2.0.2
dns:
- 10.2.0.100
adguard:
container_name: adguard
image: adguard/adguardhome
restart: unless-stopped
hostname: adguard
# Volumes store your data between container upgrades
volumes:
- "./adguard/opt-adguard-work:/opt/adguardhome/work"
- "./adguard/opt-adguard-conf:/opt/adguardhome/conf"
networks:
private_network:
ipv4_address: 10.2.0.100```
Thank you in advance for your help. Hope to get support soon.
Regards.