FAITH(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’… FAITH(4) β€” okay bestie, let's talk about the faith interface πŸ¦‹

So this is the manual page for faith, a pseudo-device β€” and it lives in the Kernel Interfaces Manual, section 4, iykyk. It's literally called the "IPv6-to-IPv4 TCP relay capturing interface" and honestly? That name is doing a LOT of work, but it's accurate, so. ✨


πŸŽ€ SYNOPSIS πŸŽ€

pseudo-device faith

That's it. That's the whole synopsis. No cap. πŸ’…


🌸 DESCRIPTION 🌸

Okay so here's the vibe: the faith interface captures IPv6 TCP traffic, and the whole reason it exists is so you can build a userland IPv6-to-IPv4 TCP relay β€” like faithd(8), which is the main character here.

faith interfaces don't just exist, bestie β€” they're dynamically created and destroyed with the ifconfig(8) create and destroy subcommands. Slay.

Here's the actually iconic part: special action gets taken when IPv6 TCP traffic is seen on a router, and the routing table suggests it should be routed to the faith interface. When that happens, the packet will be accepted by the router, regardless of the list of IPv6 interface addresses assigned to that router. (Yes, regardless. Wild, I know. 😭)

That packet then gets captured by an IPv6 TCP socket β€” but only if that socket has the IN6P_FAITH flag turned on and matching address/port pairs. So as a result, faith will let you capture IPv6 TCP traffic to some specific destination addresses. 🎯

Userland programs like faithd(8) can use this behavior to relay IPv6 TCP traffic to IPv4 TCP traffic. The program can:

  • accept some specific IPv6 TCP traffic,
  • perform getsockname(2) to get the IPv6 destination address specified by the client,
  • and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.

The IN6P_FAITH flag on an IPv6 TCP socket can be set by using setsockopt(2), with level IPPROTO_IPV6 and optname IPv6_FAITH. Pinned it for you bestie, don't lose it. πŸ“Œ

To handle error reports by ICMPv6, some ICMPv6 packets routed to a faith interface will be delivered to IPv6 TCP as well. Considerate king behavior, honestly. πŸ‘‘

To understand how faith can be used, take a look at the source code of faithd(8). The source is the real tutorial fr fr. 🧚

⚠️ Okay bestie, listen β€” this is the serious part. The faith interface implements potentially dangerous operations, so great care must be taken when configuring it. To avoid possible misuse, the sysctl(8) variable net.inet6.ip6.keepfaith must be set to 1 prior to using the interface. When net.inet6.ip6.keepfaith is 0, no packets will be captured by the faith interface. Zero. None. Nada. Don't come crying to me. 😭

And the final vibe check: the faith interface is intended to be used on routers, not on hosts. Read that again. Routers. Not your laptop. πŸ’€


πŸ’– SEE ALSO πŸ’–

Also, the academic icons themselves β€” Jun-ichiro itojun Hagino and Kazu Yamamoto β€” wrote β€œAn IPv6-to-IPv4 transport relay translator”, RFC 3142, ftp://ftp.isi.edu/in-notes/rfc3142.txt, June 2001. Legends, honestly. 🫢


🌈 HISTORY 🌈

The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the WIDE hydrangea IPv6 stack. That's the origin story, and it ate. 🌸


Okay that's the whole page, you're officially educated, go configure responsibly bestie πŸ¦‹βœ¨ β€” this beauty is from the Debian edition of the manual, dated January 9, 2010, and it's living in FAITH(4). Mwah πŸ’‹

πŸ“¦ where this page comes from