On Linux this is easy to do. Is it possible on Windows?
Clarification: I want to increment the TTL for all incoming packets.
On Linux this is easy to do. Is it possible on Windows?
Clarification: I want to increment the TTL for all incoming packets.
If you mean the default (as opposed to specific for a given packet), the registry entry is:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters]
DefaultTTL
and can be set to 1 through 255.
And, I'm reliably informed by Vinko Vrsalovic (thanks), you can also set it for each interface by modifying the DefaultTTL key in:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
\Interfaces\<InterfaceID>]
Following edit of question:
For incoming packets, the TTL is attached to a packet header when it's created at the source and decremented by the TCP/IP stack for each hop. You could write a program that will absorb the packet and create a new one but it requires low-level access to the TCP/IP stack (absorbing the packet regardless of the destination IP address and creating a new packet with a specific TTL and spoofed source address). IBM does something like this with their Edge Server load balancer, but it isn't easy. They also only have to absorb a couple of IP addresses, not an arbitrary quantity.
You also have the problem that not all packets between a source and destination will be coming through your node - that's the nature of the net and what gives it its redundancy. This may or may not be a problem for you.