Community discussions

MikroTik App
 
gdo
just joined
Topic Author
Posts: 8
Joined: Wed Jul 26, 2017 12:30 am

Plz Help me

Wed Jul 26, 2017 1:43 am

Dear All
plz any one know Solution to my problem

I have RB 750g
and 2 wan
wan1 put in ether1 ( ip wan1 : 192.168.1.1 )
wan2 put in ether2 ( ip wan2 : 192.168.2.1 )

I want to make
ether3 out use wan1 ( ip : 10.0.0.1 )
ether4 out use wan2 ( ip : 10.0.1.1 )
They work on the same hotspot

ether3 no use wan2
and ether4 no use wan1

How can I do that?
 
emikrotik
Frequent Visitor
Frequent Visitor
Posts: 71
Joined: Fri Jun 19, 2015 9:30 am

Re: Plz Help me

Wed Jul 26, 2017 2:17 am

Hi,

You will have to create source NAT rules.

/ip firewall nat add chain=srcnat src-address=10.0.0.1/24 action=src-nat to-addresses=192.168.2.1

/ip firewall nat add chain=srcnat src-address=10.0.1.1/24 action=src-nat to-addresses=192.168.1.1
 
gdo
just joined
Topic Author
Posts: 8
Joined: Wed Jul 26, 2017 12:30 am

Re: Plz Help me

Wed Jul 26, 2017 3:02 am

thank u
I will try tomorrow
 
Van9018
Long time Member
Long time Member
Posts: 558
Joined: Mon Jun 16, 2014 6:26 pm
Location: Canada - Abbotsford

Re: Plz Help me

Wed Jul 26, 2017 4:31 am

When packets go out ether2, they need to take on ether2's pubic IP.

1. IP > Firewall > NAT, add masquerade rule for packets going out ether2. Same for ether1 (it probably exists already)

At this point packets will still go out Ether1. So setup Mangle rules and routing. The mangle rule will mark packets coming in from ether3 / ether4 and apply routing marks.

2. IP > Firewall > NAT, add mangle rule. in-interface=ether3, action=new-routing-mark, routing-mark=WAN1. Do the same for ether4/WAN2
3. IP > Routes, add a route. Dest=0.0.0.0/0, Routing Mark=WAN1, Gateway=<IP of Wan1 Gateway> Do the same for WAN2

Now packets from ether3 will go out ether1, and packets from ether4 will go out ether2.

I think if WAN2 goes offline, packets may go out WAN1.. Not sure, but it's good practice to block outbound packets when the source IP is not your LAN.

4. IP > Firewall > Filters, add rule. Chain=forward, out-interface=WAN1, src-ip=!192.168.1.0/24, action=drop Do the same for WAN2/subnet2.
 
gdo
just joined
Topic Author
Posts: 8
Joined: Wed Jul 26, 2017 12:30 am

Re: Plz Help me

Fri Jul 28, 2017 1:27 am

When packets go out ether2, they need to take on ether2's pubic IP.

1. IP > Firewall > NAT, add masquerade rule for packets going out ether2. Same for ether1 (it probably exists already)

At this point packets will still go out Ether1. So setup Mangle rules and routing. The mangle rule will mark packets coming in from ether3 / ether4 and apply routing marks.

2. IP > Firewall > NAT, add mangle rule. in-interface=ether3, action=new-routing-mark, routing-mark=WAN1. Do the same for ether4/WAN2
3. IP > Routes, add a route. Dest=0.0.0.0/0, Routing Mark=WAN1, Gateway=<IP of Wan1 Gateway> Do the same for WAN2

Now packets from ether3 will go out ether1, and packets from ether4 will go out ether2.

I think if WAN2 goes offline, packets may go out WAN1.. Not sure, but it's good practice to block outbound packets when the source IP is not your LAN.

4. IP > Firewall > Filters, add rule. Chain=forward, out-interface=WAN1, src-ip=!192.168.1.0/24, action=drop Do the same for WAN2/subnet2.

thank i think work
i wall try

Who is online

Users browsing this forum: GoogleOther [Bot] and 203 guests