OpenMarine

Full Version: Option to set ttl for outgoing packets when connection shared
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In a recent discussion on the PBO forum a couple of users suggested that openplotter's access point wouldn't work in marinas which actively detected and denied connection sharing. Neither knew how this was done and it's not something I've personally encountered but all I can think of is that the places they were talking about blocked packets with a ttl of less than 64 on the assumption that they had passed through a router.

So I don't know if this is even a good idea or if anyone wants it (I don't) but just in case someone asks in future this should be able to implement this by adding an appropriate option and then conditionally (if the option set) appending to the iptables config in wifi_server.py:
iptables -t mangle -A POSTROUTING -o share -j TTL --ttl-set 64
(or make the ttl value the parameter the user supplies)

This sets outgoing packets to have a ttl of 64 which should mean that next hop devices won't be able to distinguish packets sent out by the pi itself and those routed through it.

If I thought this was a great idea I would have submitted a pull request but I include it here only in case anyone ever asks
Thanks for sharing!