Changing TTL for incoming packets from client
Posted: Fri Jan 15, 2021 6:28 pm
Hi everyone!
This is our network setup:
Client Device -> Router -> Mikrotik RB750gr3 -> ISP(WAN)
I have currently set up a mangle rule so that any incoming packets from ISP would change TTL to 2. This is to make sure that the packets that would be going to clients would be TTL=1 after their router.
But in this setup the problem is that if a client connects another router instead of a device, the routers that they have automatically increase(yes, increase instead of -1) if the is TTL=1 to TTL=128.
To solve this I am trying to implement instead that if the incoming packets to my Mikrotik from the client having TTL<=62, the packets would be dropped automatically.
This is the command I'm using but its not working.
I tried also to mark the connections with TTL less than 63 and then block those in /ip firewall filter but to no effect.
I hope someone could help me on this.
This is our network setup:
Client Device -> Router -> Mikrotik RB750gr3 -> ISP(WAN)
Code: Select all
/ip firewall mangle
add action=change-ttl chain=postrouting new-ttl=set:2 out-interface=all-ppp passthrough=yes
But in this setup the problem is that if a client connects another router instead of a device, the routers that they have automatically increase(yes, increase instead of -1) if the is TTL=1 to TTL=128.
To solve this I am trying to implement instead that if the incoming packets to my Mikrotik from the client having TTL<=62, the packets would be dropped automatically.
This is the command I'm using but its not working.
Code: Select all
/ip firewall filter
add action=drop chain=prerouting ttl=less-than:63
I hope someone could help me on this.