Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /ip route
- add check-gateway=ping comment=exit-1 distance=1 gateway=192.168.11.11 routing-mark=exit-1
- add check-gateway=ping comment=exit-2 distance=1 gateway=192.168.12.12 routing-mark=exit-2
- add check-gateway=ping comment=exit-1 distance=1 gateway=192.168.13.13 routing-mark=exit-3
- add check-gateway=ping comment=exit-2 distance=1 gateway=192.168.14.14 routing-mark=exit-4
- add check-gateway=ping comment=exit-1 distance=1 gateway=192.168.15.15 routing-mark=exit-5
- add check-gateway=ping comment=jalur-1 distance=1 gateway=192.168.11.11 routing-mark=jalur-1
- add check-gateway=ping comment=jalur-1 distance=2 gateway=192.168.12.12 routing-mark=jalur-1
- add check-gateway=ping comment=jalur-1 distance=3 gateway=192.168.13.13 routing-mark=jalur-1
- add check-gateway=ping comment=jalur-1 distance=4 gateway=192.168.14.14 routing-mark=jalur-1
- add check-gateway=ping comment=jalur-1 distance=5 gateway=192.168.15.15 routing-mark=jalur-1
- add check-gateway=ping comment=jalur-2 distance=1 gateway=192.168.12.12 routing-mark=jalur-2
- add check-gateway=ping comment=jalur-2 distance=2 gateway=192.168.13.13 routing-mark=jalur-2
- add check-gateway=ping comment=jalur-2 distance=3 gateway=192.168.14.14 routing-mark=jalur-2
- add check-gateway=ping comment=jalur-2 distance=4 gateway=192.168.15.15 routing-mark=jalur-2
- add check-gateway=ping comment=jalur-2 distance=5 gateway=192.168.11.11 routing-mark=jalur-2
- add check-gateway=ping comment=jalur-3 distance=1 gateway=192.168.13.13 routing-mark=jalur-3
- add check-gateway=ping comment=jalur-3 distance=2 gateway=192.168.14.14 routing-mark=jalur-3
- add check-gateway=ping comment=jalur-3 distance=3 gateway=192.168.15.15 routing-mark=jalur-3
- add check-gateway=ping comment=jalur-3 distance=4 gateway=192.168.12.12 routing-mark=jalur-3
- add check-gateway=ping comment=jalur-3 distance=5 gateway=192.168.11.11 routing-mark=jalur-3
- add check-gateway=ping comment=jalur-4 distance=1 gateway=192.168.14.14 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=2 gateway=192.168.15.15 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=3 gateway=192.168.13.13 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=4 gateway=192.168.12.12 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=5 gateway=192.168.11.11 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=1 gateway=192.168.15.15 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=2 gateway=192.168.11.11 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=3 gateway=192.168.12.12 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=4 gateway=192.168.13.13 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-4 distance=5 gateway=192.168.14.14 routing-mark=jalur-4
- add check-gateway=ping comment=jalur-1 distance=1 gateway=192.168.11.11
- add check-gateway=ping comment=jalur-2 distance=2 gateway=192.168.12.12
- add check-gateway=ping comment=jalur-3 distance=3 gateway=192.168.13.13
- add check-gateway=ping comment=jalur-4 distance=4 gateway=192.168.14.14
- add check-gateway=ping comment=jalur-4 distance=5 gateway=192.168.15.15
- /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 game online silahkan copas di terminal winbox dari https://pastebin.com/raw/q0xFVpqb
- #agar input dan output sesuai dengan jalurnya masing-masing
- /ip firewall mangle
- add action=mark-connection chain=input comment=exit-1 in-interface=ether1 new-connection-mark=exit-1 passthrough=yes
- add action=mark-connection chain=input comment=exit-2 in-interface=ether2 new-connection-mark=exit-2 passthrough=yes
- add action=mark-connection chain=input comment=exit-3 in-interface=ether3 new-connection-mark=exit-3 passthrough=yes
- add action=mark-connection chain=input comment=exit-4 in-interface=ether4 new-connection-mark=exit-4 passthrough=yes
- add action=mark-connection chain=input comment=exit-5 in-interface=ether5 new-connection-mark=exit-5 passthrough=yes
- add action=mark-routing chain=output comment=exit-1 connection-mark=exit-1 new-routing-mark=exit-1 passthrough=no
- add action=mark-routing chain=output comment=exit-2 connection-mark=exit-2 new-routing-mark=exit-2 passthrough=no
- add action=mark-routing chain=output comment=exit-3 connection-mark=exit-3 new-routing-mark=exit-3 passthrough=no
- add action=mark-routing chain=output comment=exit-4 connection-mark=exit-4 new-routing-mark=exit-4 passthrough=no
- add action=mark-routing chain=output comment=exit-5 connection-mark=exit-5 new-routing-mark=exit-5 passthrough=no
- #Bila LB PCC murni :
- /ip firewall mangle
- add action=mark-routing chain=prerouting comment=jalur-1 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-1 passthrough=yes per-connection-classifier=both-addresses-and-ports:5/0 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-2 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-2 passthrough=yes per-connection-classifier=both-addresses-and-ports:5/1 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-3 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-3 passthrough=yes per-connection-classifier=both-addresses-and-ports:5/2 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-4 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-4 passthrough=yes per-connection-classifier=both-addresses-and-ports:5/3 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-5 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-5 passthrough=yes per-connection-classifier=both-addresses-and-ports:5/4 src-address-list=private-lokal
- #Bila jalur-1 untuk port game online, dan jalur 2,3,4,5 di LB PCC :
- /ip firewall mangle
- #accept tcp port game di jalur-1
- add action=accept chain=prerouting src-address-list=private-lokal dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=tcp src-address-list=private-lokal
- #accept udp port game di jalur-1
- add action=accept chain=prerouting src-address-list=private-lokal dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=udp src-address-list=private-lokal
- #LB PCC jalur 2,3,4,5
- add action=mark-routing chain=prerouting comment=jalur-2 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-2 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/0 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-3 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-3 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/1 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-4 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-4 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/2 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-5 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-5 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/3 src-address-list=private-lokal
- #Bila jalur-1 dan jalur 2 untuk port game online, dan jalur 3,4,5 di LB PCC :
- /ip firewall mangle
- #LB PCC tcp port game
- add action=mark-routing chain=prerouting comment=jalur-1 dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=tcp dst-address-type=!local new-routing-mark=jalur-1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-2 dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=tcp dst-address-type=!local new-routing-mark=jalur-2 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1 src-address-list=private-lokal
- #LB PCC udp port game
- add action=mark-routing chain=prerouting comment=jalur-1 dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=udp dst-address-type=!local new-routing-mark=jalur-1 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-2 dst-address-list=games dst-port=!21,22,23,80,81,88,5050,843,443,182,8777,1935,8000-8081 protocol=udp dst-address-type=!local new-routing-mark=jalur-2 passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1 src-address-list=private-lokal
- #LB PCC jalur 3,4,5
- add action=mark-routing chain=prerouting comment=jalur-3 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-3 passthrough=yes per-connection-classifier=both-addresses-and-ports:3/0 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-4 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-4 passthrough=yes per-connection-classifier=both-addresses-and-ports:3/1 src-address-list=private-lokal
- add action=mark-routing chain=prerouting comment=jalur-5 dst-address-list=!private-lokal dst-address-type=!local new-routing-mark=jalur-5 passthrough=yes per-connection-classifier=both-addresses-and-ports:3/2 src-address-list=private-lokal
- #buatlah system sechedule dengan nama "fail-over" dengan interval 5s
- #untuk cek apakah setiap modem masih ada koneksi internet atau tidak
- #bila modem tersebut tanpa koneksi internet, maka tidak perlu mematikan modem
- #karena otomatis akan berpindah jalur ke modem yang ada koneksi internetnya
- #copykan scrit dibawah ini pada bagian on-ovent :
- #jalur-1 cek
- :if ([/ping address=208.67.222.222 interface=ether1 routing=exit-1 count=5] = 0) do={/ip route set [find comment=jalur-1 gateway=192.168.11.11 distance=1] distance=6} else={/ip route set [find comment=jalur-1 gateway=192.168.11.11 distance=6] distance=1};
- #jalur-2 cek
- :if ([/ping address=208.67.222.222 interface=ether2 routing=exit-2 count=5] = 0) do={/ip route set [find comment=jalur-2 gateway=192.168.12.12 distance=1] distance=6} else={/ip route set [find comment=jalur-2 gateway=192.168.12.12 distance=6] distance=1};
- #jalur-3 cek
- :if ([/ping address=208.67.222.222 interface=ether3 routing=exit-3 count=5] = 0) do={/ip route set [find comment=jalur-3 gateway=192.168.13.13 distance=1] distance=6} else={/ip route set [find comment=jalur-3 gateway=192.168.13.13 distance=6] distance=1};
- #jalur-4 cek
- :if ([/ping address=208.67.222.222 interface=ether4 routing=exit-4 count=5] = 0) do={/ip route set [find comment=jalur-4 gateway=192.168.14.14 distance=1] distance=6} else={/ip route set [find comment=jalur-4 gateway=192.168.14.14 distance=6] distance=1};
- #jalur-5 cek
- :if ([/ping address=208.67.222.222 interface=ether5 routing=exit-5 count=5] = 0) do={/ip route set [find comment=jalur-5 gateway=192.168.15.15 distance=1] distance=6} else={/ip route set [find comment=jalur-5 gateway=192.168.15.15 distance=6] distance=1};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement