Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /ppp profile
- add comment="for PPPoE to ISP2" interface-list=WAN name=isp2_client \
- on-down="/ip route remove [ find gateway=\"4.2.2.2\" ]\r\
- \n/ip route remove [ find where dst-address ~\"4.2.2.2\" ]\r\
- \n/ip firewall nat remove [find comment=\"NAT via ISP2\"]\r\
- \n/ip route rule remove [find comment=\"From ISP2 IP to Inet\"]" \
- on-up="/ip route remove [ find gateway=\"4.2.2.2\" ]; /ip route remove \
- [ find where dst-address ~\"4.2.2.2\" ]\r\
- \n/ip route add check-gateway=ping comment=\"For recursion via ISP2\" distance=1 \
- dst-address=4.2.2.2/32 gateway=\$\"remote-address\" scope=10\r\
- \n/ip route add check-gateway=ping comment=\"Unmarked via ISP2\" distance=3 \
- gateway=4.2.2.2\r\
- \n/ip route add comment=\"Marked via ISP2 Main\" distance=1 gateway=4.2.2.2 \
- routing-mark=to_isp2\r\
- \n/ip route add comment=\"Marked via ISP1 Backup2\" distance=3 gateway=4.2.2.2 \
- routing-mark=to_isp1\r\
- \n/ip firewall mangle set [find comment=\"Connmark in from ISP2\"] \
- in-interface=\$\"interface\"\r\
- \n/ip firewall nat add action=src-nat chain=srcnat ipsec-policy=out,none \
- out-interface=\$\"interface\" to-addresses=\$\"local-address\" \
- comment=\"NAT via ISP2\"\r\
- \n/ip route rule add comment=\"From ISP2 IP to Inet\" \
- src-address=\$\"local-address\" table=to_ISP2 "
- /interface pppoe-client add allow=mschap2 comment="to ISP2" disabled=no \
- interface=ether2 name=pppoe-isp2 password=3100000000 profile=isp2_client \
- user=3100000000
- /ip firewall mangle add action=mark-connection chain=prerouting \
- comment="Connmark in from ISP2" connection-mark=no-mark in-interface=pppoe-isp2 \
- new-connection-mark=conn_isp2 passthrough=no
Add Comment
Please, Sign In to add comment