0% found this document useful (0 votes)
29 views2 pages

Mikrotik Firewall Configuration Guide

Uploaded by

fachrismurf66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

Mikrotik Firewall Configuration Guide

Uploaded by

fachrismurf66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

/ip firewall address-list

add address=111.111.111.0/24 list=IP_LOKAL

add address=192.168.3.0/24 list=IP_LOKAL

add address=192.168.6.0/24 list=IP_LOKAL

add address=192.168.1.0/24 list=IP_LOKAL

/ip firewall nat

add chain=srcnat out-interface="ether1 - wan 1" action=masquerade

add chain=srcnat out-interface="ether3 - wan 2" action=masquerade


/ip firewall mangle

add action=accept chain=prerouting dst-address-list=IP_LOKAL src-address-list=IP_LOKAL

add action=accept chain=postrouting dst-address-list=IP_LOKAL src-address-list=IP_LOKAL

add action=accept chain=forward dst-address-list=IP_LOKAL src-address-list=IP_LOKAL

add action=accept chain=input dst-address-list=IP_LOKAL src-address-list=IP_LOKAL

add action=accept chain=output dst-address-list=IP_LOKAL src-address-list=IP_LOKAL

add action=mark-connection chain=input in-interface=" ether1 - wan 1" new-connection-mark="cm-


ether1_Internet_fiber" passthrough=yes

add action=mark-connection chain=input in-interface=" ether3 - wan 2" new-connection-mark="cm-


ether6_mikrotik_astinet" passthrough=yes

add action=mark-routing chain=output connection-mark="cm-ether1_Internet_fiber" new-routing-


mark="to-ether1_Internet_fiber" passthrough=yes

add action=mark-routing chain=output connection-mark="cm-ether6_mikrotik_astinet" new-routing-


mark="to-ether6_mikrotik_astinet" passthrough=yes

add action=mark-connection chain=prerouting dst-address-type=!local new-connection-mark="cm-


ether1_Internet_fiber" passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0 dst-
address-list=!IP_LOKAL src-address-list=IP_LOKAL

add action=mark-connection chain=prerouting dst-address-type=!local new-connection-mark="cm-


ether6_mikrotik_astinet" passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1 dst-
address-list=!IP_LOKAL src-address-list=IP_LOKAL

add action=mark-routing chain=prerouting connection-mark="cm-ether1_Internet_fiber" new-routing-


mark="to-ether1_Internet_fiber" passthrough=yes dst-address-list=!IP_LOKAL src-address-
list=IP_LOKAL

add action=mark-routing chain=prerouting connection-mark="cm-ether6_mikrotik_astinet" new-routing-


mark="to-ether6_mikrotik_astinet" passthrough=yes dst-address-list=!IP_LOKAL src-address-
list=IP_LOKAL

/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark="to-ether1_Internet_fiber"

add check-gateway=ping distance=1 gateway=192.168.3.253 routing-mark="to-ether6_mikrotik_astinet"

add check-gateway=ping distance=1 gateway=192.168.1.1

add check-gateway=ping distance=2 gateway=192.168.3.253

You might also like