Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #AUTO SWITCH DNS-TRUST / DNS-SEHAT / DNS-OPEN
- #COPY DAN PASTE KE TERMINAL WINBOX
- /ip fi add rem [find list=ip-maksiat]
- /ip fi add rem [find list=private-lokal]
- /ip fi na rem [find comment~"dns"]
- /ip fi na rem [find comment="blokir-ip-maksiat"]
- /ip fi fi rem [find dst-port="53,5353"]
- /sys sch rem auto-switch-dns
- /ip firewall address-list
- add address=10.0.0.0/8 list=private-lokal
- add address=172.16.0.0/12 list=private-lokal
- add address=192.168.0.0/16 list=private-lokal
- /ip firewall filter
- add action=drop chain=input comment=dns-flood dst-port=53,5353 protocol=tcp src-address-list=!private-lokal
- add action=drop chain=input comment=dns-flood dst-port=53,5353 protocol=udp src-address-list=!private-lokal
- add action=drop chain=forward comment=dns-flood dst-port=53,5353 protocol=tcp src-address-list=!private-lokal
- add action=drop chain=forward comment=dns-flood dst-port=53,5353 protocol=udp src-address-list=!private-lokal
- /ip dns
- set allow-remote-requests=yes servers=103.80.80.243,103.80.80.244
- add action=dst-nat chain=dstnat comment=dns-trust1 dst-port=53,5353 protocol=tcp src-address-list=private-lokal to-addresses=103.80.80.243 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-trust1 dst-port=53,5353 protocol=udp src-address-list=private-lokal to-addresses=103.80.80.243 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-trust2 dst-port=53,5353 protocol=tcp src-address-list=private-lokal to-addresses=103.80.80.244 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-trust2 dst-port=53,5353 protocol=udp src-address-list=private-lokal to-addresses=103.80.80.244 to-ports=5353
- /ip firewall nat
- add action=dst-nat chain=dstnat comment=dns-sehat1 dst-port=53,5353 protocol=tcp src-address-list=private-lokal to-addresses=103.80.80.248 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-sehat1 dst-port=53,5353 protocol=udp src-address-list=private-lokal to-addresses=103.80.80.248 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-sehat2 dst-port=53,5353 protocol=tcp src-address-list=private-lokal to-addresses=103.80.80.249 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-sehat2 dst-port=53,5353 protocol=udp src-address-list=private-lokal to-addresses=103.80.80.249 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-open1 dst-port=53,5353 protocol=tcp src-address-list=private-lokal to-addresses=208.67.220.220 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-open1 dst-port=53,5353 protocol=udp src-address-list=private-lokal to-addresses=208.67.220.220 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-open2 dst-port=53,5353 protocol=tcp src-address-list=private-lokal to-addresses=208.67.222.222 to-ports=5353
- add action=dst-nat chain=dstnat comment=dns-open2 dst-port=53,5353 protocol=udp src-address-list=private-lokal to-addresses=208.67.222.222 to-ports=5353
- /tool netwatch
- add comment=dns-sehat1 down-script="/ip firewall nat disable [find comment=\"dns-sehat1\"]" host=103.80.80.248 interval=10s up-script=\
- "/ip firewall nat enable [find comment=\"dns-sehat1\"]"
- add comment=dns-sehat2 down-script="/ip firewall nat disable [find comment=\"dns-sehat2\"]" host=103.80.80.249 interval=10s up-script=\
- "/ip firewall nat enable [find comment=\"dns-sehat2\"]"
- add comment=dns-trust1 down-script="/ip firewall nat disable [find comment=\"dns-trust1\"]" host=103.80.80.243 interval=10s up-script=\
- "/ip firewall nat enable [find comment=\"dns-trust1\"]"
- add comment=dns-trust1 down-script="/ip firewall nat disable [find comment=\"dns-trust2\"]" host=103.80.80.244 interval=10s up-script=\
- "/ip firewall nat enable [find comment=\"dns-trust2\"]"
- add comment=dns-open1 down-script="/ip firewall nat disable [find comment=\"dns-open1\"]" host=208.67.220.220 interval=10s up-script=\
- "/ip firewall nat enable [find comment=\"dns-open1\"]"
- add comment=dns-open2 down-script="/ip firewall nat disable [find comment=\"dns-open2\"]" host=208.67.222.222 interval=10s up-script=\
- "/ip firewall nat enable [find comment=\"dns-open2\"]"
- {
- /tool fetch url="https://raw.githubusercontent.com/cespun/ip-maksiat/master/.gitignore/list%3Dip-maksiat" mode=http
- /import file=list%3Dip-maksiat
- /file remove list%3Dip-maksiat
- }
Add Comment
Please, Sign In to add comment