3km

Untitled

3km
Jun 20th, 2020
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. /ppp profile
  2. add comment="for PPPoE to ISP2" interface-list=WAN name=isp2_client \
  3. on-down="/ip route remove [ find gateway=\"4.2.2.2\" ]\r\
  4. \n/ip route remove [ find where dst-address ~\"4.2.2.2\" ]\r\
  5. \n/ip firewall nat remove [find comment=\"NAT via ISP2\"]\r\
  6. \n/ip route rule remove [find comment=\"From ISP2 IP to Inet\"]" \
  7. on-up="/ip route remove [ find gateway=\"4.2.2.2\" ]; /ip route remove \
  8. [ find where dst-address ~\"4.2.2.2\" ]\r\
  9. \n/ip route add check-gateway=ping comment=\"For recursion via ISP2\" distance=1 \
  10. dst-address=4.2.2.2/32 gateway=\$\"remote-address\" scope=10\r\
  11. \n/ip route add check-gateway=ping comment=\"Unmarked via ISP2\" distance=3 \
  12. gateway=4.2.2.2\r\
  13. \n/ip route add comment=\"Marked via ISP2 Main\" distance=1 gateway=4.2.2.2 \
  14. routing-mark=to_isp2\r\
  15. \n/ip route add comment=\"Marked via ISP1 Backup2\" distance=3 gateway=4.2.2.2 \
  16. routing-mark=to_isp1\r\
  17. \n/ip firewall mangle set [find comment=\"Connmark in from ISP2\"] \
  18. in-interface=\$\"interface\"\r\
  19. \n/ip firewall nat add action=src-nat chain=srcnat ipsec-policy=out,none \
  20. out-interface=\$\"interface\" to-addresses=\$\"local-address\" \
  21. comment=\"NAT via ISP2\"\r\
  22. \n/ip route rule add comment=\"From ISP2 IP to Inet\" \
  23. src-address=\$\"local-address\" table=to_ISP2 "
  24.  
  25.  
  26.  
  27. /interface pppoe-client add allow=mschap2 comment="to ISP2" disabled=no \
  28. interface=ether2 name=pppoe-isp2 password=3100000000 profile=isp2_client \
  29. user=3100000000
  30.  
  31.  
  32. /ip firewall mangle add action=mark-connection chain=prerouting \
  33. comment="Connmark in from ISP2" connection-mark=no-mark in-interface=pppoe-isp2 \
  34. new-connection-mark=conn_isp2 passthrough=no
Add Comment
Please, Sign In to add comment