@Martineau
thanks for the latest version 1.3 of the script. I wanted to consult with you why its not working in my case
here is what i ran in order to redirect 2 specific domain to my client #1
Code:
andresmorago@RT-AC68U-5358:/jffs/scripts# ./IPSET_Domains.sh 1 principal pandora.com
(IPSET_Domains.sh): 24637 Starting Script Execution
(IPSET_Domains.sh): 24637 IPSET created: principal hash:net family inet hashsize 1024 maxelem 65536
(IPSET_Domains.sh): 24637 CRON schedule created: #principal# '0 2 * * * ipset save principal'
(IPSET_Domains.sh): 24637 Selective Routing Rule via VPN Client 1 created (TAG fwmark 0x1000/0x1000)
(IPSET_Domains.sh): 24637 Completed Script Execution
andresmorago@RT-AC68U-5358:/jffs/scripts# ./IPSET_Domains.sh 1 principal ifconfig.io
(IPSET_Domains.sh): 25058 Starting Script Execution
0 2 * * * ipset save principal > /opt/principal #principal#
(IPSET_Domains.sh): 25058 Selective Routing Rule via VPN Client 1 created (TAG fwmark 0x1000/0x1000)
(IPSET_Domains.sh): 25058 Completed Script Execution
dnsmasq.conf.add shows them correctly
Code:
strict-order
dhcp-option=lan,42,10.0.0.1 # ntpMerlin
server=/pool.ntp.org/1.1.1.1
ipset=/pandora.com/principal
ipset=/ifconfig.io/principal
but traffic to these 2 domains is just not going to my vpn but to wan
Code:
andresmorago@RT-AC68U-5358:/jffs/scripts# iptables -nvL PREROUTING -t mangle --line
Chain PREROUTING (policy ACCEPT 642 packets, 116K bytes)
num pkts bytes target prot opt in out source destination
1 0 0 MARK all -- br0 * 0.0.0.0/0 0.0.0.0/0 match-set principal dst MARK or 0x1000
andresmorago@RT-AC68U-5358:/jffs/scripts#
Code:
andresmorago@RT-AC68U-5358:/jffs/scripts# ip rule
0: from all lookup local
9990: from all fwmark 0x8000/0x8000 lookup main
9991: from all fwmark 0x3000/0x3000 lookup ovpnc5
9992: from all fwmark 0x7000/0x7000 lookup ovpnc4
9993: from all fwmark 0x4000/0x4000 lookup ovpnc3
9994: from all fwmark 0x2000/0x2000 lookup ovpnc2
9995: from all fwmark 0x1000/0x1000 lookup ovpnc1
32766: from all lookup main
32767: from all lookup default
Accept DNS Configuration is STRICT
i also see that the cron job disappears after a reboot
Code:
0 2 * * * ipset save principal > /opt/principal #principal#
am i missing something?
thanks