MikroTik Solution


Route all traffics of particular local IP or IP block to defined gateway



Step 1:  Create Address List from Firewall

Step 2:  Create Mangle Rule from Firewall

Step 3:  Create Route

Step 4:  Create NAT Rule from Firewall

Step 5:  Create another Route to access local server



Details Discussion

Step 1: Create Address List:

MikroTik Flow-Chart:  IP -> Firewall -> Address Lists

Procedure:  Click Add Button (+)


Name:  Name of IP or IP block on the basis of purposes

Address:  Put a IP or IP block (Example: 192.168.1.28 or 192.168.10.15-192.168.10.20)

Apply -> OK    [Optional:  Create a comment for identifying Address Lists]

Step 2: Create Mangle Rule:

MikroTik Flow-Chart:  IP -> Firewall ->Mangle

Procedure:  Click Add Button (+)


General Tab:  Chain = Prerouting, Source (Src.) Address = Desired IP or IP block (Example: 192.168.1.28 or 192.168.10.15-192.168.10.20)

Action Tab:  Action = mark routing, New Routing Mark = May be same name of step 1’s name or different one.


Apply -> OK    [Optional:  Create a comment for identifying Address Lists]

Step 3: Create Route:

MikroTik Flow-Chart:  IP -> Routes

Procedure:  Click Add Button (+)


General Tab:  Destination (Dst.) Address = 0.0.0.0/0 or desired block

Gateway = Desired Gateway IP

Routing Mark = Select the name with down arrow which created in Mangle rule (New Routing Mark).

Step 4: Create NAT Rule:

MikroTik Flow-Chart:  IP -> Firewall -> NAT

Procedure:  Click Add Button (+)


General Tab: Chain = srcnat, Src. Address = Select desired IP or IP block (Example: 192.168.1.28 or 192.168.10.15-192.168.10.20), Dst. Address = 0.0.0.0/0, Out. Interface = Select the name with down arrow which port or ISP you want to assign.


Action Tab: Action = masquerade

Apply -> OK    [Optional:  Create a comment for identifying Address Lists]

Step 5:  Create another Route to access local server:

MikroTik Flow-Chart:  IP -> Routes

Procedure:  Click Add Button (+)


General Tab:  Destination (Dst.) Address = 192.168.0.0/16 or desired block

Gateway = LAN_bridge

Routing Mark = Select the name with down arrow which created in Mangle rule (New Routing Mark).

References:

** stackoverflow.com 
4.       https://wiki.mikrotik.com/wiki/Load_Balancing

1 comment:

  1. Your article is good.Who are new they are good understand about this article.

    www.doodlei.net

    Doodle is a domain registration company in Bangladesh that is
    dedicated to helping small ventures and individuals launch their ideas online.

    ReplyDelete