It is not a DietPi issue (I assume), but I still hope someone here can help me.
Everything runs on Docker, below is my setup:
docker-compose.yml
# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
---
version: '3.9'
networks:
internal:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/24
gateway: 172.20.0.1
external:
driver: macvlan
driver_opts:
parent: wlan0
ipam:
config:
- subnet: 192.168.1.0/24 # My network subnet
gateway: 192.168.1.1 # My network gateway
ip_range: 192.168.1.192/27 # Range from 192 to 222
services:
duckdns:
image: ghcr.io/linuxserver/duckdns:latest
container_name: duckdns
hostname: duckdns
network_mode: host
environment:
- PUID=${USER_ID}
- PGID=${GROUP_ID}
- TZ=${TIMEZONE}
- SUBDOMAINS=${DUCKDNS_SUBDOMAINS}
- TOKEN=${DUCKDNS_TOKEN}
- UPDATE_IP=ipv4
- LOG_FILE=false
volumes:
- ${CONFIG_ROOT}/duckdns:/config
restart: unless-stopped
swag:
image: ghcr.io/linuxserver/swag:latest
container_name: swag
hostname: swag
depends_on:
- duckdns
cap_add:
- NET_ADMIN
environment:
- PUID=${USER_ID}
- PGID=${GROUP_ID}
- TZ=${TIMEZONE}
- URL=${DUCKDNS_SUBDOMAINS}.duckdns.org
- SUBDOMAINS=wildcard
- VALIDATION=duckdns
- DUCKDNSTOKEN=${DUCKDNS_TOKEN}
- EMAIL=${EMAIL}
- DOCKER_MODS=ghcr.io/linuxserver/mods:swag-auto-reload|ghcr.io/linuxserver/mods:swag-dashboard
volumes:
- ${CONFIG_ROOT}/swag:/config
ports:
- 443:443
- 80:80
- 81:81
networks:
internal:
external:
ipv4_address: 192.168.1.201
aliases:
- 192.168.1.201
restart: unless-stopped
adguardhome:
image: adguard/adguardhome:latest
container_name: adguardhome
hostname: adguardhome
environment:
- PUID=${USER_ID}
- PGID=${GROUP_ID}
- TZ=${TIMEZONE}
volumes:
- ${CONFIG_ROOT}/adguardhome/workdir:/opt/adguardhome/work
- ${CONFIG_ROOT}/adguardhome/confdir:/opt/adguardhome/conf
ports:
- 53:53/tcp
- 53:53/udp
- 67:67/udp
- 68:68/udp
- 80:80/tcp
- 443:443/tcp
- 443:443/udp
- 3000:3000/tcp
- 853:853/tcp
- 853:853/udp
- 5443:5443/tcp
- 5443:5443/udp
- 6060:6060/tcp
networks:
internal:
external:
ipv4_address: 192.168.1.202
aliases:
- 192.168.1.202
restart: unless-stopped
Raspberry Pi has address: 192.168.1.200
SWAG has address: 192.168.1.201
AdGuard Home has address: 192.168.1.202
Everything works well on the local network, all services are available at their respective IPs, also the SWAG server can be accessed externally at the address www.example.duckdns.org
.
The problem now is this…
I installed the “Dashboard Docker mod for SWAG”, I would like it to be accessible at dashboard.example.duckdns.org
, but I get the error 403 Forbidden
.
Reading the mod documentation and searching online, I’m supposed to be using the “DNS rewrites” feature of AdGuard Home ( do I understand it right?), but the dashboard is still not externally accessible.
I don’t know if I’m misconfiguring the “DNS rewrites” feature of AdGuard Home, if I’m doing something else wrong, or if I’m totally off the rails…
If anyone has experience with similar configurations and DNS servers, I would be very grateful if they can help me.