Advertisement
mrdbarcode

forward dns to vpndns

Jan 17th, 2019
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. ## Tinggal COPAS saja ke New Terminal Mikrotik, sedangkan script dibagian bawah setelah pagar untuk menghapusnya
  2.  
  3. /ip fi add add list=LOCAL address=127.0.0.0/8 comment=DNS4Free
  4. /ip fi add add list=LOCAL address=192.168.0.0/16 comment=DNS4Free
  5. /ip fi add add list=LOCAL address=172.16.0.0/12 comment=DNS4Free
  6. /ip fi add add list=LOCAL address=10.0.0.0/8 comment=DNS4Free
  7. /int pptp-client add name=DNS4Free connect-to=103.80.80.112 user=DNS4Free password=!QAZ2wsx#EDC4rfv max-mtu=1492 max-mru=1492 add-default-route=no disabled=no comment=DNS4Free
  8. /ip fi fi add chain=input src-address-list=!LOCAL protocol=udp dst-port=53 action=drop comment=DNS4Free
  9. /ip fi fi move [find comment=DNS4Free] 0
  10. /ip fi na add chain=dstnat src-address-list=LOCAL protocol=udp dst-port=53 action=redirect to-ports=53 comment=DNS4Free
  11. /ip fi na add chain=srcnat action=masquerade out-interface=DNS4Free comment=DNS4Free
  12. /ip fi na move [find comment=DNS4Free] 0
  13. /ip ro add gateway=172.31.255.254 routing-mark=DNS4Free comment=DNS4Free
  14. /ip rou rule add action=lookup table=DNS4Free dst-address=103.80.80.243 comment=DNS4Free
  15. /ip rou rule add action=lookup table=DNS4Free dst-address=103.80.80.244 comment=DNS4Free
  16. /ip rou rule add action=lookup table=DNS4Free dst-address=103.80.80.248 comment=DNS4Free
  17. /ip rou rule add action=lookup table=DNS4Free dst-address=103.80.80.249 comment=DNS4Free
  18. /ip rou rule add action=lookup table=DNS4Free dst-address=208.67.220.220 comment=DNS4Free
  19. /ip rou rule add action=lookup table=DNS4Free dst-address=208.67.222.222 comment=DNS4Free
  20. /ip rou rule add action=lookup table=DNS4Free dst-address=8.8.8.8 comment=DNS4Free
  21. /ip rou rule add action=lookup table=DNS4Free dst-address=8.8.4.4 comment=DNS4Free
  22. /ip rou rule add action=lookup table=DNS4Free dst-address=151.101.10.219 comment=DNS4Free
  23. /ip dns set servers=103.80.80.248,103.80.80.249 allow-remote-requests=yes
  24.  
  25.  
  26. ########################################################################################
  27. ########################################################################################
  28.  
  29. # BAGI YANG INGIN MEMBUANG RULE DIATAS BERIKUT PERINTAHNYA
  30.  
  31. /ip fi add rem [find comment=DNS4Free]
  32. /int pptp-client rem [find comment=DNS4Free]
  33. /ip fi fi rem [find comment=DNS4Free]
  34. /ip fi na rem [find comment=DNS4Free]
  35. /ip ro rem [find comment=DNS4Free]
  36. /ip rou rule rem [find comment=DNS4Free]
  37. /ip dns set servers=8.8.8.8,8.8.4.4 allow-remote-requests=yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement