Community discussions

MikroTik App
 
User avatar
dibatech
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Tue Apr 04, 2006 10:14 am

Multiple Gateway problems

Sun Apr 26, 2009 8:18 pm

I have a problem with incoming connections on pppoe interfaces from my ISP.
Incoming connections are being replied to correctly but via the wrong interface (the default route interface)
I am marking connections and routes on each of these.

Routing Setup:
dst-address=0.0.0.0/0 gateway=XXX.XXX.XXX.XXX
dst-address=0.0.0.0/0 gateway=pppoe1 routing-mark=GW1
dst-address=0.0.0.0/0 gateway=pppoe2 routing-mark=GW2
dst-address=0.0.0.0/0 gateway=pppoe3 routing-mark=GW3

I mark each of the gateways like this:

(Doesn't work - connecting directly to router for maintenance)
add action=mark-connection chain=prerouting connection-state=new disabled=no in-interface=pppoe1 \
new-connection-mark=from-pppoe1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=from-pppoe1 disabled=no \
new-routing-mark=GW1 passthrough=no

This SHOULD cause incoming connections to this interface leave via the same interface

(WORKS - Natting connections in from outside)
add action=mark-connection chain=forward comment="" connection-mark=from-pppoe1 disabled=no \
dst-address=192.168.0.0/16 new-connection-mark=from-pppoe1ToLan passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=from-pppoe1ToLan disabled=no \
new-routing-mark=GW1 passthrough=no

This makes sure that if i dst-nat or netmap a port in from the pppoe interface the reply will leave via the same interface

The problem is that connections terminating on the router itself example telnet, ssh etc works, but the reply from the router originates from the wrong interface.

Is there a better way to make sure that traffic that enters on an interface leaves through the same interface?

I have also tried with /ip route rules but with no luck.

Any ideas welcome
 
Basil
just joined
Posts: 21
Joined: Tue Nov 20, 2007 10:35 am

Re: Multiple Gateway problems

Fri May 01, 2009 5:02 pm

I seem to be having a similar problem - check my post - I think its do do with the routing mark not taking effect on all packets. What do you think?

Who is online

Users browsing this forum: homelap2024, yhfung and 46 guests