Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

After some research, I was wondering if it was possible to define a TTL by interface as I can the Hop Limit definition in ipv6.

To change the TTL in IPv4, I can change the file

 /proc/sys/net/ipv4/ip_default_ttl 

But this changes TTL for all interfaces.

However in IPv6, you can put a different hop limit value for each interfaces

/proc/sys/net/ipv6/conf/eth*/hop_limit

So do I miss something? or there is no way to configure a different TTL for each interface ?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

If that entry does not exist for ipv4, it's probably not supported.

But have you tried to modify TTL values with iptables? See if the TTL target helps

share|improve this answer
    
Thank you for your answer. Unfortunately, I supposed too that it is not supported and I'm looking for a trick to do that. I will look at your link. –  grattmandu03 Mar 19 at 10:26
    
I will use iptables to do what I want, especially that I need to specify TTL by protocols. So very useful link, thank you. –  grattmandu03 Mar 19 at 13:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.