1, 先在pfSense后台关闭DNS解析和DNS转发. 2, 启动pfSense远程ssh登录, 系统-高级选项-启动安全Shell. 3, ssh 登录pfSense 代码: cd / mkdir opt cd /opt fetch https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.105.2/AdGuardHome_freebsd_amd64.tar.gz 备注:AdGuard新版本请看这里 https://github.com/AdguardTeam/AdGuardHome/releases/ 输入ip地址加3000端口, 这样就可以登录AdGuard后台了 比如我的这台http://192.168.11.1:3000 注意, 这里是http 设置AdGuard开机自启动 编辑如下代码 代码: #!/bin/sh /opt/AdGuardHome/./AdGuardHome 然后再重启pfSense
另外, pfSense的ntopng还有Grafana插件默认端口也是3000, 如果需要安装这两个插件,可以考虑把AdGuard的网页管理端口改为其他的,如3100. 如果之前已经安装的朋友可以编辑文件/opt/AdGuardHome/AdGuardHome.yaml 把端口改为3100, 然后重启系统就行了 pfSense后台也有在线编辑的工具, 诊断-编辑文件 代码: bind_host: 0.0.0.0 bind_port: 3100 beta_bind_port: 0 users: - name: admin
如果要配合OpenWRT旁路由网关使用可以按照以下方法设置. 如pfSense (AdGuard)的IP是: 192.168.11.1 OpenWRT的IP是: 192.168.11.2 1, 先在OpenWRT上设置接口-LAN口那边设置DNS公共DNS, 或运营商提供的DNS. 2, 在AdGuard设置DNS为192.168.11.2, 不要再设置其他公共DNS了. 3, 在pfSense里面常规设置-DNS服务器地址设置为本机的192.168.11.1
几个新的版本 AdGuard Home v0.106.3 代码: https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.106.3/AdGuardHome_freebsd_amd64.tar.gz v0.107.0-b.5 (测试版) 代码: https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.0-b.5/AdGuardHome_freebsd_amd64.tar.gz
还有一些关于开机自动启动的建议 https://github.com/AdguardTeam/AdGuardHome/issues/1352 https://forums.torguard.net/index.php?/topic/2546-pfsense-adguardhome-with-doq/ Making AdGuard Home start on boot : Special thanks to eoghan2t9 for a start up script for AdGuardHome which works flawlessly. The script is found here : https://github.com/AdguardTeam/AdGuardHome/issues/1352 Some modifications are required for pfSense AdGuardHome. Follow these steps below : C - Delete the contents of the file and fill it with these contents below : 代码: #!/bin/sh . /etc/rc.subr name="adguardhome" rcvar="adguardhome_enable" adguardhome_user="root" adguardhome_command="/opt/AdGuardHome/AdGuardHome" pidfile="/var/run/${name}.pid" command="/usr/sbin/daemon" command_args="-P ${pidfile} -r -f ${adguardhome_command}" load_rc_config $name : ${adguardhome_enable:=yes} run_rc_command "$1" D- Make it executable - I run this command - it works for me: 代码: # chmod 755 /usr/local/etc/rc.d/adguardhome.sh E - In order to have pfSense use default start up script ( /usr/local/etc/rc.d/adguardhome.sh ) at boot time you will have to create a boot time start up script for it in /etc/rc.conf.d/. Not to prolong this - do the following : 代码: # touch /etc/rc.conf.d/adguardhome - create the needed new file # nano /etc/rc.conf.d/adguardhome - in the new file enter the following two lines: 添加文件 代码: adguardhome_enable="YES" adguardhome_bootup_run="/usr/local/etc/rc.d/adguardhome.sh" Save and exit / then make the file executable - once again - works for me : 代码: chmod 755 /etc/rc.conf.d/adguardhome
pfSense出了一个Linux / Unix一键安装脚本 代码: curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v