Skip to content

Instantly share code, notes, and snippets.

@mb00g
Created April 5, 2015 06:13
Show Gist options
  • Save mb00g/cc58e2ff8291e496110b to your computer and use it in GitHub Desktop.
Save mb00g/cc58e2ff8291e496110b to your computer and use it in GitHub Desktop.
[[email protected] Mertokondo Kebumen] > /ip firewall mangle export
# apr/05/2015 13:12:09 by RouterOS 6.25
#
/ip firewall mangle
add action=mark-connection chain=prerouting in-interface=wan new-connection-mark=wan01_conn
add action=mark-connection chain=prerouting in-interface=wan-02 new-connection-mark=wan02_conn
add action=mark-routing chain=output connection-mark=wan01_conn new-routing-mark=to_wan01
add action=mark-routing chain=output connection-mark=wan02_conn new-routing-mark=to_wan02
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=local new-connection-mark=wan01_conn per-connection-classifier=\
both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=local new-connection-mark=wan02_conn per-connection-classifier=\
both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=wan01_conn in-interface=local new-routing-mark=to_wan01
add action=mark-routing chain=prerouting connection-mark=wan02_conn in-interface=local new-routing-mark=to_wan02
add action=mark-routing chain=prerouting comment="Routing Valve" dst-address-list=Valve new-routing-mark=Valve
add action=mark-packet chain=postrouting comment="Mark Packet Download" dst-address=192.168.10.1 new-packet-mark=down-pack-1 out-interface=local
[[email protected] Mertokondo Kebumen] > /ip route export
# apr/05/2015 13:13:01 by RouterOS 6.25
#
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_wan01
add check-gateway=ping distance=2 gateway=192.168.2.1 routing-mark=to_wan02
add distance=1 dst-address=0.0.0.0/32 gateway=wan routing-mark=Valve
add check-gateway=ping distance=1 gateway=8.8.8.8
add check-gateway=ping distance=2 gateway=8.8.4.4
add distance=1 dst-address=8.8.4.4/32 gateway=192.168.2.1 scope=10
add distance=1 dst-address=8.8.8.8/32 gateway=192.168.1.1 scope=10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment