Home 局域网内部 dns
Post
Cancel

局域网内部 dns

安装dnsmasq

  1. 在服务里面安装dnsmasq
  2. 修改配置文件/etc/dnsmasq.conf,增加一个域名,强制解析到指定的地址上,例如address= /wanderer.cloud/10.0.0.1`
  3. 启动dnsmasq,sudo systemctl start dnsmasq
  4. 查看53端口,debian系netstat -tunlp | grep 53 archlinux系ss -a | grep 53
  5. 其他电脑使用这个dns服务器,则需要设置/etc/resolv.conf文件nameserver 10.0.0.1

解析局域网的ip地址为二级域名

  1. 需要安装caddy
  2. 修改配置文件,将本地的nextcloud gitea服务的ip地址解析成二级域名
    1
    2
    3
    4
    5
    6
    7
    8
    
    http://wanderer.cloud{
     gzip
     proxy / http://127.0.0.1:9000
    }
    http://git.wanderer.cloud{
     gzip
     proxy / http://127.0.0.1:3000
    }
    
This post is licensed under CC BY 4.0 by the author.

archlinux折腾记录

Unity Hex Map技术测试