Community discussions

MikroTik App
 
ntenev
just joined
Topic Author
Posts: 2
Joined: Thu May 03, 2012 1:47 pm

General port-forwarding and routing case

Fri May 04, 2012 12:17 pm

Hi guys!

Although this case is not RouterOS specific I hope to find answer here. I have RouterBoard RB493G with 3 different ISP (ISP1, ISP2, ISP3) connections on 3 of ethernet ports (Ether1, Ether2, Ether3). One of them (ISP1) is used as default gateway (ISP1_GW reachable via Ether1) and I have and a port-forwarding (Port1) rule to internal host (Host1) reachable via Ether4.

The problem is next:
If I receive request on ISP1_IP:Port1 packets are forwarded to Host1:Port1, then response is returned also via ISP1_GW and everything is fine. But if request is on ISP2_IP:Port1 packets are forwarded to Host1:Port1, but responses again out from RouterBoard via ISP1_GW (as this is default gateway) and connection, of course, fail.

Is it possible to be created such a scheme in wich responses to be routed through interface on wich request is received ?

Regards!
 
aslu
newbie
Posts: 36
Joined: Mon Apr 13, 2009 3:22 pm

Re: General port-forwarding and routing case

Fri May 04, 2012 1:38 pm

Your scenario is possible.

do you enable nat on it?
 
ntenev
just joined
Topic Author
Posts: 2
Joined: Thu May 03, 2012 1:47 pm

Re: General port-forwarding and routing case

Fri May 04, 2012 2:23 pm

@aslu

NAT is enabled on every ISP interface:
chain=srcnat action=masquerade out-interface=eth1
chain=srcnat action=masquerade out-interface=eth2
chain=srcnat action=masquerade out-interface=eth3