ruantiblock: Minor fixes.

autoinstall.sh: Dnsmasq rebind protection for .onion.
This commit is contained in:
gSpot
2021-10-14 22:43:01 +03:00
parent 00a1f01787
commit 87abb0e334
4 changed files with 6 additions and 5 deletions
+3
View File
@@ -222,6 +222,9 @@ InstallTorConfig() {
_if_lan="eth0"
fi
$UCI_CMD set ruantiblock.config.if_lan="$_if_lan"
# dnsmasq rebind protection
$UCI_CMD set dhcp.@dnsmasq[0].rebind_localhost='1'
$UCI_CMD set dhcp.@dnsmasq[0].rebind_domain='.onion'
$UCI_CMD commit
}
Binary file not shown.
+1 -1
View File
@@ -446,7 +446,7 @@ GetDataFiles() {
printf "\n" >> "$DNSMASQ_DATA_FILE"
else
### Запись для .onion в $DNSMASQ_DATA_FILE
printf "server=/onion/%s\nipset=/onion/%s\n" "${ONION_DNS_ADDR}" "${IPSET_ONION}" >> "$DNSMASQ_DATA_FILE"
printf "server=/.onion/%s\nipset=/.onion/%s\n" "${ONION_DNS_ADDR}" "${IPSET_ONION}" >> "$DNSMASQ_DATA_FILE"
fi
rm -f "$UPDATE_PID_FILE"
return $_return_code
+2 -4
View File
@@ -1,12 +1,10 @@
User admin
PidFile /var/run/tor.pid
User tor
DataDirectory /var/lib/tor
VirtualAddrNetwork 10.254.0.0/16
AutomapHostsOnResolve 1
TransPort 192.168.1.1:9040
TransPort 127.0.0.1:9040
DNSPort 9053
DNSListenAddress 127.0.0.1
DNSPort 127.0.0.1:9053
#SOCKSPort 192.168.1.1:9050 # Tor socks-proxy
GeoIPFile /usr/share/tor/geoip
GeoIPv6File /usr/share/tor/geoip6