![]() |
|
![]() |
#1 |
Moderator
Регистрация: 20.07.2014
Адрес: МСК
Сообщений: 991
Вес репутации: 1031 ![]() ![]() ![]() |
![]()
Вроде получилось. Криво конечно.
Развернуть для просмотраСозданы правила iptables (все строки надо повторять для каждого фильтруемого устройства):
Заблокирован трафик IPv6 через web Luci Код:
IPv6-traffic From any host in lan with source 00:00:00:00:00:01 To any host in wan Refuse forward Код:
iptables -t nat -I PREROUTING -i br-lan -m mac --mac-source 00:00:00:00:00:01 -p udp -m udp --dport 53 -j REDIRECT --to-port 585 #Повторить строки для всех фильтруемых устройств Создана страница заглушка для заблокированных сайтов: Код:
/etc/config/uhttpd config uhttpd 'second' list listen_http '0.0.0.0:80' list listen_https '0.0.0.0:443' list listen_http '[::]:80' list listen_https '[::]:443' # Server document root option home '/mnt/www/uhttpd' option error_page '/index.html' option rfc1918_filter '1' option max_requests '3' option cert '/etc/uhttpd.crt' option key '/etc/uhttpd.key' option cgi_prefix '/cgi-bin' option script_timeout '60' option network_timeout '30' option tcp_keepalive '1' Создан конфиг для фэйкового ДНС сервера /etc/dnsmasq2.conf Код:
# fake dns for parent filter resolv-file=/tmp/resolv.conf.auto user=dnsmasq group=dnsmasq log-queries log-facility=/var/log/dnsmasq.log no-poll domain-needed bogus-priv #listen-address=192.168.1.10 cache-size=150 #allowed sites server=/yandex.ru/# server=/googleapis.com/# server=/wikipedia.org/# server=/mos.ru/# server=/dnevnik.ru/# server=/microsoft.com/# server=/google.com/# #restrict all other address=/#/192.168.1.1 Код:
/usr/sbin/dnsmasq -C /etc/dnsmasq2.conf -x /var/run/dnsmasq/dnsmasq.restrict.pid -p 585 -k --log-facility=/mnt/data/dns-logs/dnsqueres.log& [свернуть] Косяки: Почему-то не логируются запросы. Нет удобного веб-интерфейса. Очень интересно как это реализовано в заводских прошивках роутеров. |
![]() |
![]() |
![]() |
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1) | |
Опции темы | Поиск в этой теме |
Опции просмотра | |
|
|