First set o rules don't work if I enabled another set of rules

Hi all,

I created a set of rules that you can see below, everything works fine, no complaints.

  1. PPTP client (mikrotik) - connected to a PPTP Server
  2. /ip firewall nat add action=masquerade chain=srcnat out-interface=PPTP
  3. /ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark=PPTP src-address=192.168.88.0/24
  4. /ip route add distance=1 dst-address=172.23.241.250/32 gateway=PPTP routing-mark=PPTP

But if enable another set of rules you can see below then the first set of rules don’t work anymore, why does this happen?

\

  1. PPTP client (mikrotik) - connected to another mikrotik PPTP Server
  2. /ip firewall nat add action=masquerade chain=srcnat out-interface=PPTP_2
  3. /ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark=PPTP_2 src-address=192.168.88.0/24
  4. /ip route add distance=1 dst-address=172.16.11.120/32 gateway=PPTP_2 routing-mark=PPTP_2

Thank you.

PPTP_1 and PPTP_2 are both 172.23.241.250/32 ?

A packet from 192.168.88.0/24 destined to 172.23.241.250 will first have it’s routing mark set to PPTP_1, but then the next mangle rule changes that mark to PPTP_2 and the packet will go out on PPTP_2.

No no, sorry I’ve made a mistake, I edited the first post, second route is to: 172.16.11.250

How to configure so that both set o rules would work together?

Anybody ?

Your mangle rules need to have different criteria.

The first mangle rule sets the routing mark to PPTP when the src address is 192.168.88.0/24.

Then the second rule will change that routing mark to PPTP_2 when the src address is 192.168.88.0/24

Thus all packets will always go out the second route.

What are you trying to do?