Plz Help me

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?

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

thank u
I will try tomorrow

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.

  1. IP > Firewall > NAT, add mangle rule. in-interface=ether3, action=new-routing-mark, routing-mark=WAN1. Do the same for ether4/WAN2
  2. IP > Routes, add a route. Dest=0.0.0.0/0, Routing Mark=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.

  1. 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