-
Notifications
You must be signed in to change notification settings - Fork 23
第三步 简简单单的通过lxc安装个Adguardhome
cooip-jm edited this page Mar 6, 2024
·
4 revisions
创建AdGuard alpine lxc
名字自己随便自定义,我这是为了演示方便。 (有人说
————能记住长名字并熟练的在键盘输入进去,可以有效防止老年痴呆,也不知道真假。。。)
lxc-create --name AdGuard --template download -- --dist alpine --release 3.19 --arch arm64 --server mirrors.bfsu.edu.cn/lxc-images
nano /var/lib/lxc/AdGuard/config具体IP根据自己情况而定
# Distribution configuration
lxc.include = /usr/share/lxc/config/common.conf
lxc.arch = linux64
# Container specific configuration
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.rootfs.path = dir:/var/lib/lxc/AdGuard/rootfs
lxc.uts.name = AdGuard
# Network configuration
lxc.net.0.type = veth
lxc.net.0.link = vmbr0
lxc.net.0.flags = up
进入并配置网络IP
lxc-start AdGuard
lxc-attach AdGuardvi /etc/network/interfaces####根据自己实际情况修改
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.6.111/24
gateway 192.168.6.11
hostname AdGuard修改好后重启网络
/etc/init.d/networking restart检查是否生效
ip a
wget --no-verbose -O - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
sudo /opt/AdGuardHome/AdGuardHome -s start|stop|restart|status|install|uninstall



https://dns.ipv6dns.com/dns-query
tls://dns.alidns.com
tls://dns.ipv6dns.com
h3://dns.alidns.com/dns-query

apt install lsof -y
lsof -i :53 ###查看端口占用情况COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 14542 systemd-resolve 13u IPv4 86178 0t0 UDP 127.0.0.53:domain
systemd-r 14542 systemd-resolve 14u IPv4 86179 0t0 TCP 127.0.0.53:domainsudo mkdir -p /etc/systemd/resolved.conf.dnano /etc/systemd/resolved.conf.d/adguardhome.conf[Resolve]
DNS=127.0.0.1
DNSStubListener=nosudo mv /etc/resolv.conf /etc/resolv.conf.backup
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.confsudo systemctl reload-or-restart systemd-resolved