Re: Changing ttl of incoming packets

From: GiZmen (gizmen_at_blurp.one.pl)
Date: 04/23/04

  • Next message: GiZmen: "Re: Changing ttl of incoming packets"
    Date: Fri, 23 Apr 2004 02:34:21 +0200
    To: freebsd-hackers@freebsd.org
    
    

    > >>
    > >>Is there any way to change ttl of incoming packet to a lower value ?
    > >>I had tried min-ttl option in pf packet filter but this option only
    > >>increase
    > >>ttl to a given value when ttl is lower than this value.
    > >>
    > >>I have searched on google and mailing lists but i do not find any answer.
    > >>I am running Freebsd 5.2.1 and i am using pf as my packet filter.
    > >>
    > >You mean, make the IP forwarding decrement the IP TTL more than by one?
    > i've seen some cable/dsl ips's to do this, they set the IP TTL to 1 on the
    > downlink to the client. (as a lame attempt to stop people sharing their
    > connection)
    > So if one put some sort of gateway on the dsl/cable modem, all
    > the packets it receives are with IP TTL 1, and the gateway will not able to
    > forward them to the internal network....... which is in my opinion
    > 1-st ugly, and 2-nd, easily avoidable with min-ttl for example :)
    > but if pf has min-ttl it seems that max-ttl can be easily added.
    > also i think i've seen somewhere on the net a netgraph module that can
    > modify ttl's and some other things. i think it's name was ng_mangle
    ---end quoted text---

    Yes true i saw some gateways that use this trick too and that was my inspiration
    to look around how it can be done. But i didnt found any option to do that.
    max-ttl option would be a good idea to add to pf :)
    So there is no posibility to change ttl with kernel or some other tool.
    So how this dsl/cable modem gateways change theirs ttl to 1?

    thx

    -- 
    Best Regards:
    		GiZmen
    UNIX is user-friendly; it's just picky about its friends
    UNIX is simple; it just takes a genius to understand its simplicity
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: GiZmen: "Re: Changing ttl of incoming packets"

    Relevant Pages

    • Re: Changing TTL of incoming packets?
      ... Just play with raw sockets and change TTL field in IP header, ... RFC791 where it is but be aware that dummy header have to be changed too, ... let's concentrate on the gateway case. ...
      (microsoft.public.win32.programmer.networks)
    • Network traffic: ttl
      ... I found that gateway I use, sometimes receives packets from my FreeBSD ... they always got ttl 64. ...
      (freebsd-stable)
    • Network traffic: ttl
      ... I found that gateway I use, sometimes receives packets from my FreeBSD ... they always got ttl 64. ...
      (freebsd-net)
    • Re: Changing TTL of incoming packets?
      ... if the TTL is 1 the gateway will drop the packet and the host will get ... Can I change the TTL of packets from 1 to, say, 2 in order to avoid this problem? ... If you are the gateway, ...
      (microsoft.public.win32.programmer.networks)
    • Re: Changing ttl of incoming packets
      ... >> ttl to a given value when ttl is lower than this value. ... >> I have searched on google and mailing lists but i do not find any answer. ... UNIX is simple; it just takes a genius to understand its simplicity ...
      (freebsd-hackers)