p .Nm must be invoked on IPv4/v6 dual stack router. The router must be configured to capture all the TCP traffic toward reserved IPv6 address prefix, by using .Xr route 8 and .Xr sysctl 8 commands. .Nm will daemonize itself on invocation.
p .Nm will listen to TCPv6 port .Ar service . If TCPv6 traffic to port .Ar service is found, .Nm will relay the TCPv6 traffic to TCPv4. Destination for relayed TCPv4 connection will be determined by the last 4 octets of the original IPv6 destination. For example, if .Li 3ffe:0501:4819:ffff:: is reserved for .Nm faithd , and the TCPv6 destination address is .Li 3ffe:0501:4819:ffff::0a01:0101 , the traffic will be relayed to IPv4 destination .Li 10.1.1.1 .
p If .Ar service is not given, .Li telnet is assumed, and .Nm will relay TCP traffic on TCP port .Li telnet . With .Ar service , .Nm will work as TCP relaying daemon for specified .Ar service as described above.
p Since .Nm listens to TCP port .Ar service , it is not possible to run local TCP daemons for port .Ar service on the router, using .Xr inetd 8 or other standard mechanisms. By specifying .Ar serverpath to .Nm faithd , you can run local daemons on the router. .Nm will invoke local daemon at .Ar serverpath if the destination address is local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify .Ar serverargs for the arguments for the local daemon.
p To use .Nm translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. Kernel must be properly configured to route all the TCP connection toward the reserved IPv6 address prefix into the .Dv faith pseudo interface, by using .Xr route 8 command. Also, .Xr sysctl 8 should be used to configure .Dv net.inet6.ip6.keepfaith to .Dv 1 .
p If .Fl d is given, debugging information will be generated using .Xr syslog 3 . If .Fl p is given, .Nm will use privileged TCP port number as source port, for IPv4 TCP connection toward final destination. For relaying .Xr ftp 1 and .Xr rlogin 1 , .Fl p is not necessary as special program code is supplied.
p .Nm will relay both normal and out-of-band TCP data. It is capable of emulating TCP half close as well. .Nm includes special support for protocols used by .Xr ftp 1 and .Xr rlogin 1 . When translating FTP protocol, .Nm translates network level addresses in .Li PORT/LPRT/EPRT and .Li PASV/LPSV/EPSV commands. For RLOGIN protocol, .Nm will relay back connection from .Xr rogind 8 on the server to .Xr rlogin 1 on client.
p Inactive sessions will be disconnected in 30 minutes, to avoid stale sessions from chewing up resources. This may be inappropriate for some of the services
o should this be configurable?
c .
.Sh EXAMPLES
To translate
.Li telnet
service, and provide no local telnet service, invoke
.Nm
as either of the following:
d -literal -offset # faithd
# faithd telnet
.Ed
p If you would like to provide local telnet service via .Xr telnetd 8 on .Li /usr/local/v6/libexec/telnetd , user the following command line: d -literal -offset # faithd telnet /usr/local/v6/libexec/telnetd telnetd .Ed
p If you would like to pass extra arguments to the local daemon: d -literal -offset # faithd ftpd /usr/local/v6/libexec/ftpd ftpd -l .Ed
p
Here are some other examples:
d -literal -offset # faithd login /usr/local/v6/libexec/rlogin rlogind
# faithd shell /usr/local/v6/libexec/rshd rshd
# faithd sshd
.Ed
.Sh RETURN VALUES
.Nm
exits with
.Dv EXIT_SUCCESS
q 0 on success, and .Dv EXIT_FAILURE
q 1
on error.
.Sh SEE ALSO
.Xr route 8 ,
.Xr sysctl 8
.Sh SECURITY NOTICE
It is very insecure to use
.Xr rhosts 5
and other IP-address based authentication, for connections relayed by
.Nm
o and any other TCP relaying services
c .
.Sh HISTORY
The
.Nm
command first appeared in WIDE Hydrangea IPv6 protocol stack kit.