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