Toggle navigation
蔚藍部落
友站連結
留言板
登录
分类
懶得分類
電腦技術進化論
Win伺服器
伺服器
綠色和平在行動
天下亂侃
日記本
金融風暴
網站日誌
DNSmasq+PHPDNS(web界面)
发布于 2018-12-23
共有 0 条评论
访问: 279 次
- PHPdns代码仓库:[https://github.com/helloxz/phpdns/](https://github.com/helloxz/phpdns/)  编辑`application/helpers/check_helper.php`设置用户名、密码 填坑 页面`application/views/admin.php`中的菜单链接错误,需将`list`改为`listrecord`。 如:`
hosts列表
` - Nginx伪静态 ```shell location ^~ /application { deny all; } location ^~ /system { deny all; } location ^~ /(application|system) { deny all; } location / { try_files $uri $uri/ /index.php?$query_string; } ``` - 建立软链接 ```shell ln -s /home/wwwroot/dns.local/application/conf/hosts.conf /etc/dnsmasq.d/hosts.conf ln -s /home/wwwroot/dns.local/application/conf/adblock.conf /etc/dnsmasq.d/adblock.conf ``` - 定时shell脚本`reload.sh` ```shell #!/bin/bash find /home/wwwroot/dns.local/application/conf/ -name '*.conf' -mmin -1 -exec /bin/systemctl restart dnsmasq.service {} \; ``` 赋予执行权限 `chmod +x reload.sh`,添加定时任务`*/1 * * * * /root/reload.sh` - 查看dnsmasq状态 xxx@debian-local:~# systemctl status dnsmasq.service -l ● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled) Drop-In: /run/systemd/generator/dnsmasq.service.d └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf Active: active (running) since 一 2018-12-23 09:51:01 CST; 1min 21s ago Process: 22015 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=exited, status=0/SUCCESS) Process: 22032 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS) Process: 22025 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS) Process: 22022 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS) Main PID: 22031 (dnsmasq) CGroup: /system.slice/dnsmasq.service └─22031 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,19036,8,2,49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5 --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d 12月 23 09:51:01 debian-local dnsmasq[22022]: dnsmasq: syntax check OK. 12月 23 09:51:01 debian-local dnsmasq[22031]: started, version 2.72 cachesize 150 12月 23 09:51:01 debian-local dnsmasq[22031]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect 12月 23 09:51:01 debian-local dnsmasq[22031]: DNS service limited to local subnets 12月 23 09:51:01 debian-local dnsmasq[22031]: reading /etc/resolv.conf 12月 23 09:51:01 debian-local dnsmasq[22031]: using nameserver 192.168.24.2#53 12月 23 09:51:01 debian-local dnsmasq[22031]: read /etc/hosts - 5 addresses 12月 23 09:51:01 debian-local systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
发表新评论
取消回复
发送
×
Login with