OpenWrt_Luci_Lua/1_9.r18_plugin/adbyby/bin/ipset.sh

10 lines
339 B
Bash
Raw Permalink Normal View History

2016-02-16 07:48:49 +00:00
#!/bin/sh
ipset -N adbyby_list hash:ip
iptables -t nat -A PREROUTING -p tcp -m set --match-set adbyby_list dst -j REDIRECT --to-port 8118
sed -e '/.*adbyby_host.conf/d' -i /etc/dnsmasq.conf
echo "conf-file=/tmp/adbyby_host.conf" >> "/etc/dnsmasq.conf"
#/etc/storage/dnsmasq/dnsmasq.conf
restart_dhcpd
/etc/init.d/dnsmasq restart