Community discussions

MikroTik App
 
talha909
just joined
Topic Author
Posts: 8
Joined: Mon Feb 22, 2016 12:30 pm

Mark Local Traffic on Specific Route.

Thu Mar 03, 2016 9:00 am

HI,

These are ips which are using by me. I am using RB 750 GL router board. I want to transfer my local IP to only access WAN2. Or WAN2 + WAN3. Please some one guide me in this matter.

192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2
192.168.3.2/24 network=192.168.3.0 broadcast=192.168.3.255 interface=WAN3
 
Revelation
Member
Member
Posts: 336
Joined: Fri Dec 25, 2015 5:59 am

Re: Mark Local Traffic on Specific Route.

Thu Mar 03, 2016 3:22 pm

You can setup your src-nat to only allow the specific network you want routed out of the WAN interface. You can also setup routes for each network going out specific WAN interfaces.
 
talha909
just joined
Topic Author
Posts: 8
Joined: Mon Feb 22, 2016 12:30 pm

Re: Mark Local Traffic on Specific Route.

Thu Mar 03, 2016 3:27 pm

I am new. Can you plz create one nat for me.
 
Revelation
Member
Member
Posts: 336
Joined: Fri Dec 25, 2015 5:59 am

Re: Mark Local Traffic on Specific Route.

Thu Mar 03, 2016 5:50 pm

I am new. Can you plz create one nat for me.
I'm not in front of my CCR so I cannot confirm the syntax on this. This should give you an idea, at least, of what you need to configure.
/ip firewall nat 
 add chain=src-nat action=srcnat src-address=192.168.2.0/24 out-interface="WAN1"

For the WAN1 part you will need to input your physical interface.
 
talha909
just joined
Topic Author
Posts: 8
Joined: Mon Feb 22, 2016 12:30 pm

Re: Mark Local Traffic on Specific Route.

Fri Mar 04, 2016 9:06 am

Please check my firewall address list is correct.

/ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1 Internet.
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2 Internet
add address=192.168.3.2/24 network=192.168.3.0 broadcast=192.168.3.255 interface=WAN3 Internet

/ip firewall address-list
add address=192.168.0.239 disabled=no list=DSL1_USERS_LIST

/ip firewall mangle
add action=mark-routing chain=prerouting disabled=no new-routing-mark=wan1_user passthrough=no src-address-list=DSL1_USERS_LIST
add action=mark-routing chain=prerouting disabled=no new-routing-mark=wan2_user passthrough=no src-address-list=DSL2_USERS_LIST

/ip route
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.2.2 routing-mark=wan1_user scope=30 target-scope=10
add disabled=no distance=3 dst-address=0.0.0.0/0 gateway=192.168.3.2 routing-mark=wan2_user scope=30 target-scope=10

/ip firewall nat
add action=masquerade chain=srcnat disabled=no src-address=192.168.0.0/24

Who is online

Users browsing this forum: No registered users and 11 guests