Re: Changing packets ttl's

From: Julian Elischer (julian_at_elischer.org)
Date: 04/29/05

  • Next message: Sten Spans: "Re: if_tap unaligned access problem"
    Date: Fri, 29 Apr 2005 14:18:24 -0700
    To: Jeremie Le Hen <jeremie@le-hen.org>
    
    

    Jeremie Le Hen wrote:

    >Hi,
    >
    >
    >
    >>No this sysctl is not what i want.
    >>I need to change ttl of outgoing packets to my internal network.
    >>For example. There is connection from host on internet.
    >>it has for example 10 hops to my gateway. And when packet comes
    >>to my box it has for example 55 ttl in ip header.
    >>And then it is routed to host in my network so my box change ttl
    >>to 54. But what i need is change ttl to '1'.
    >>
    >>
    >
    >In Linux terms, you want to ``mangle'' the packet, we-writing its TTL.
    >AFAIK, this is not possible with FreeBSD since this is really not a
    >common action for a firewall (some conservative folks would even argue
    >this is not its job). The pf firewall seems to have a ``min-ttl''
    >statement in traffic normalization, but there is no ``max-ttl'' one.
    >
    >The simplest way to achieve this is to write a userland daemon which
    >will retrieve the packet from the firewall from a divert socket, using
    >ipfw(8). But this would have very poor performances in case you need
    >high-bandwidth traffic as each packet would require at least two
    >context switches, but for a DSL connexion, I guess this would be ok.
    >
    >

    Your assertion that the diverted packets add a lot of latency is not
    quite true.

    While it is slower than in-kernel processing, it is not nearly as bad as
    some people make out.
    Certainly it can keep up with the average internet connection.

    I would add code to do the mangling into a program such as natd and set
    it up to do no
    translation (or a null translation).
    Alternatively there is a much simpler daemon that connects in the same way.

    In ports look for net/tcpmssd, which already does 99% of what you want.
    it would be about a 20 line change to tcpmssd to do this.
    It already fiddles other packets.

    >There other solution is to make a patch for one of the firewall
    >avaiable in FreeBSD.
    >
    >Best regards,
    >
    >
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Sten Spans: "Re: if_tap unaligned access problem"

    Relevant Pages

    • Changing packets ttls
      ... I am searching how to change packet ttl. ... gateway and i would like to change ttl of any packets that are ... so the last hop is the next host in my internal network. ... UNIX is simple; it just takes a genius to understand its simplicity ...
      (freebsd-net)
    • Re: Changing packets ttls
      ... > I need to change ttl of outgoing packets to my internal network. ... There is connection from host on internet. ... In Linux terms, you want to ``mangle'' the packet, we-writing its TTL. ... The pf firewall seems to have a ``min-ttl'' ...
      (freebsd-net)
    • Re: JBN users busted by NSA, proving NSA blows your privacy
      ... > ''Eelbash'' once boasted at a Las Vegas conference that he could crack JBN ... > piece of evidence that led Canadian authorities to arrest an Ottawa man on ... > Internet traffic. ... The packet is wrapped in what computer scientists ...
      (sci.crypt)
    • RE: [Full-Disclosure] Wiretap or Magic Lantern?
      ... traffic is recoverable and to monitor for abuse. ... The NSA has over 3 Bill USD/Year in open book funding. ... Internet pioneer and computer-science professor at Carnegie-Mellon ... so does the envelope of a digitized packet. ...
      (Full-Disclosure)
    • RE: risks of ip-forwarding, without ipf/ipfw
      ... If I wasn't actually packet filtering, ... >> big bad internet and one on a home lan, with ip forwarding enabled, ... > A.k.a. a router. ... with "unsubscribe freebsd-security" in the body of the message ...
      (FreeBSD-Security)