当前位置: 首页 > 工具软件 > smartdns > 使用案例 >

centos7安装docker使用smartdns+adguardhome+阿里云webdev,更新ipv6访问

梁祯
2023-12-01
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager  --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io

systemctl enable docker 
systemctl start docker

docker network create -d bridge --ipv6 --subnet "fc::1/64" --gateway="fc::1" --subnet=172.18.0.0/16 --gateway=172.18.0.1 docker-br0

docker run --net docker-br0 --ip 172.18.0.2 --ip6="fc::2" --name adguardhome -v /home/adguardhome/work:/opt/adguardhome/work -v  /home/adguardhome/conf:/opt/adguardhome/conf -p 53:53/tcp -p 53:53/udp -p 67:67/udp -p 80:80/tcp -p 443:443/tcp -p 853:853/tcp -p 3000:3000/tcp --restart=always -d adguard/adguardhome

docker run -d -p 6053:53/udp --restart=always --net docker-br0 --ip 172.18.0.3 --ip6="fc::3" --name gsmartdns -v /home/smartdns/conf:/smartdns -v /home/smartdns/tmp:/tmp ghostry/smartdns

docker run --net docker-br0 --ip 172.18.0.4 --ip6="fc::4" -d --name=aliyundrive-webdav --restart=unless-stopped -p 8080:8080 \
  -v /etc/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \
  -e REFRESH_TOKEN='XXXXXXXXXX' \
  -e WEBDAV_AUTH_USER=admin \
  -e WEBDAV_AUTH_PASSWORD=XXXXX \
  messense/aliyundrive-webdav

假设centos7管理地址为192.168.3.10

对应的:

adguardhome首次配置地址:192.168.3.10:3000

管理页面地址:192.168.3.10

阿里云webdev登录地址:192.168.3.10:8080

填入centos7的ipv6地址可正常使用adguardhome

其他:

在adguardhome的设置-DNS设置-上游DNS中加入

172.18.0.3
fc::3
202.106.195.68
202.106.46.151
223.5.5.5
223.6.6.6
114.114.114.114
119.29.29.29

并勾选“最快的IP“

对应的AdGuardHome.yaml

bind_host: 0.0.0.0
bind_port: 80
beta_bind_port: 0
users:
- name: xxxxxx
  password: xxxxxxxx
auth_attempts: 5
block_auth_min: 15
http_proxy: ""
language: ""
debug_pprof: false
web_session_ttl: 720
dns:
  bind_hosts:
  - 0.0.0.0
  port: 53
  statistics_interval: 30
  querylog_enabled: true
  querylog_file_enabled: true
  querylog_interval: 720h
  querylog_size_memory: 1000
  anonymize_client_ip: false
  protection_enabled: true
  blocking_mode: default
  blocking_ipv4: ""
  blocking_ipv6: ""
  blocked_response_ttl: 10
  parental_block_host: family-block.dns.adguard.com
  safebrowsing_block_host: standard-block.dns.adguard.com
  ratelimit: 0
  ratelimit_whitelist: []
  refuse_any: true
  upstream_dns:
  - 172.18.0.3
  - fc::3
  - 202.106.195.68
  - 202.106.46.151
  - 223.5.5.5
  - 223.6.6.6
  - 114.114.114.114
  - 119.29.29.29
  upstream_dns_file: ""
  bootstrap_dns:
  - 202.106.195.68
  - 202.106.46.151
  - 9.9.9.10
  - 149.112.112.10
  - 2620:fe::10
  - 2620:fe::fe:10
  all_servers: false
  fastest_addr: true
  fastest_timeout: 1s
  allowed_clients: []
  disallowed_clients: []
  blocked_hosts:
  - version.bind
  - id.server
  - hostname.bind
  trusted_proxies:
  - 127.0.0.0/8
  - ::1/128
  cache_size: 4096000
  cache_ttl_min: 30
  cache_ttl_max: 36000
  cache_optimistic: true
  bogus_nxdomain: []
  aaaa_disabled: false
  enable_dnssec: true
  edns_client_subnet: true
  max_goroutines: 300
  ipset: []
  filtering_enabled: true
  filters_update_interval: 24
  parental_enabled: false
  safesearch_enabled: true
  safebrowsing_enabled: false
  safebrowsing_cache_size: 1048576
  safesearch_cache_size: 1048576
  parental_cache_size: 1048576
  cache_time: 30
  rewrites:
  - domain: github.com
    answer: 140.82.112.4
  - domain: raw.githubusercontent.com
    answer: 185.199.108.133
  blocked_services: []
  upstream_timeout: 10s
  local_domain_name: lan
  resolve_clients: true
  use_private_ptr_resolvers: true
  local_ptr_upstreams: []
tls:
  enabled: false
  server_name: ""
  force_https: false
  port_https: 443
  port_dns_over_tls: 853
  port_dns_over_quic: 784
  port_dnscrypt: 0
  dnscrypt_config_file: ""
  allow_unencrypted_doh: false
  strict_sni_check: false
  certificate_chain: ""
  private_key: ""
  certificate_path: ""
  private_key_path: ""
filters:
- enabled: true
  url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
  name: AdGuard DNS filter
  id: 1
- enabled: true
  url: https://adaway.org/hosts.txt
  name: AdAway Default Blocklist
  id: 2
- enabled: true
  url: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareAdGuardHome.txt
  name: Dandelion Sprout's Anti-Malware List
  id: 1642235272
- enabled: true
  url: https://anti-ad.net/easylist.txt
  name: 'CHN: anti-AD'
  id: 1642235273
- enabled: true
  url: https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
  name: WindowsSpyBlocker - Hosts spy rules
  id: 1642235274
- enabled: true
  url: https://raw.githubusercontent.com/banbendalao/ADgk/master/ADgk.txt
  name: ADgk
  id: 1636735196
- enabled: true
  url: https://gitee.com/halflife/list/raw/master/ad.txt
  name: HalfLife
  id: 1636735197
- enabled: true
  url: https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
  name: NoCoin Filter List
  id: 1636735198
- enabled: true
  url: https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt
  name: 乘风视频
  id: 1641223418
- enabled: true
  url: https://gitee.com/lhzgl6587/hosts/raw/master/myruler
  name: 视频去广告
  id: 1641223419
- enabled: true
  url: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/GameConsoleAdblockList.txt
  name: Game Console Adblock List
  id: 1642838051
- enabled: true
  url: https://someonewhocares.org/hosts/zero/hosts
  name: Dan Pollock's List
  id: 1642838052
whitelist_filters: []
user_rules: []
dhcp:
  enabled: false
  interface_name: ""
  dhcpv4:
    gateway_ip: ""
    subnet_mask: ""
    range_start: ""
    range_end: ""
    lease_duration: 86400
    icmp_timeout_msec: 1000
    options: []
  dhcpv6:
    range_start: ""
    lease_duration: 86400
    ra_slaac_only: false
    ra_allow_slaac: false
clients: []
log_compress: false
log_localtime: false
log_max_backups: 0
log_max_size: 100
log_max_age: 3
log_file: ""
verbose: false
os:
  group: ""
  user: ""
  rlimit_nofile: 0
schema_version: 12
 类似资料: