Hello everyone. I have a TP-Link TD-W8970 Modem/Router with OpenWRT 18.06.1. I configure wireguard protocol and make two separate networks: one for regular WAN and another one for wireguard tunneled WAN. Here is my network
file:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdee:aa0c:26fa::/48'
config atm-bridge 'atm'
option encaps 'llc'
option payload 'bridged'
option nameprefix 'dsl'
option vci '35'
option vpi '0'
config dsl 'dsl'
option annex 'a'
option tone 'av'
option ds_snr_offset '0'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ip6assign '60'
option netmask '255.255.255.224'
option ipaddr '192.168.220.1'
config interface 'wan'
option ifname 'dsl0'
option proto 'pppoe'
option ipv6 '1'
option password '***'
option peerdns '0'
option username '***'
option force_link '1'
list dns '9.9.9.9'
option pppd_options 'debug'
option keepalive '50 5'
config device 'wan_dsl0_dev'
option name 'dsl0'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 2 4 5 6t'
config interface 'wgNet'
option proto 'wireguard'
option force_link '1'
option private_key '***'
list addresses '****/32'
list addresses '****/120'
config wireguard_wgNet
option public_key '***'
list allowed_ips '0.0.0.0/0'
list allowed_ips '::0/0'
option endpoint_port '***'
option endpoint_host '****'
config interface 'WGLOCAL'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.230.1'
option ip6assign '64'
config route
option interface 'wgNet'
option target '0.0.0.0'
option netmask '0.0.0.0'
option table 'wgvpn'
config rule
option in 'WGLOCAL'
option src '192.168.230.0/24'
option lookup 'wgvpn'
config route
option target '192.168.220.0'
option netmask '255.255.255.224'
option interface 'lan'
option table 'wgvpn'
Now, I want to use adblock for my networks. No problem with LAN, But I can't use adblock solution for my wireguard network. Maybe you've already noticed why, If not I posted it before.
Short explanation: my DNS traffic doesn't pass through wireguard tunnel by using DHCP(DNS Leak Problem), So I had to set static DNS on each client. DNS Leak Problem resolved using this trick, but now I can't using adblock for this interface.
I guess I must look for a solution that forward all device DNS queries to wireguard interface, not directly to the WAN.