Installing dtcp

It is known that the dtcp runs under FreeBSD, NetBSD and OpenBSD.

- Installing using FreeBSD ports or NetBSD pkgsrc

You can find the dtcp in ports/net/dtcp under FreeBSD or pkgsrc/net/dtcp under NetBSD. So, if you are using FreeBSD or NetBSD, it is better to use the ports or the pkgsrc for installing the dtcp.

The dtcp depends on the qpopper for the qpopauth command which is included in it, to maintain an authentication database. Though, there is some limitation in the dtcpauth, you can use it for a replacement of the qpopauth. Or, if you have no plan to use dtcps, perhaps you don't want to install the qpopper.

If you are using the FreeBSD ports, you can prevent the qpopper from being installed during installing the dtcp by the dependency from the dtcp. If you don't want to install the qpopper, please specify

DTCP_CLIENT_ONLY=YES
as an option for the make.

- making dtcp by yourself

You can install the dtcp easily by running `make && make install' even when you don't use the potrs nor the pkgsrc. However, you may need to change the part of the dtcps.rb, dtcpc.rb and dtcpauth.rb under some OSs. The settings are for FreeBSD 4.6-RELEASE and later, and NetBSD 1.6 and later by default. If you are using other than these OSs, you may need to change following constants appropriately. There are following constants to be considered in dtcpc.rb and dtcps.rb:
TUNIF = "gif0"
The interface to be used for tunnel.
TUNIF_CLONING = true
Whether the virtual interface cloning (ifconfig create/destroy) is supported or not.
TUNNEL_CREATE = 'ifconfig %s tunnel %s %s'
The command to be used for the tunnel creation.
TUNNEL_DELETE = 'ifconfig %s deletetunnel'
The command to be used for the tunnel deletion.
ROUTE_METHOD = ROUTE_IFP
The command type to be used for configuring routes.
ROUTE_CHANGE
route add -inet6 #{dest} ::1
route change -inet6 #{dest} ::1 -ifp #{tunif}
ROUTE_INTERFACE
route add -inet6 #{dest} -interface #{tunif}
ROUTE_IFP
route add -inet6 #{dest} ::1 -ifp #{tunif}
Other
Set a route to a link-local address of a tunnel interface of local side.

Next, if you want to use qpopauth, you need to change dtcps.rb for the database in which APOP password is stored. The settings in dtcps.rb are corresponding to the qpopper installed from the ports of FreeBSD or the pkgsrc of NetBSD by default. Otherwise, please change the part in dtcps.rb appropriately.

POPAUTHDB = '/usr/local/etc/qpopper/pop.auth'
The path for the database.
POPAUTHUID = 'pop'
The owner of the database.
There are same constants in dtcpauth.rb. If you have a plan to use dtcpauth, please change it, too.

The rc scripts will not be installed. You can find the rc scripts for NetBSD. If you are using NetBSD, copy these scripts into /etc/rc.d as dtcpc and dtcps. Don't forget to set execution bit. If you want to run dtcpc and dtcps in daemon mode under other OSs, you need to copy dtcps.sh and dtcpc.sh and custmize these appropriately.

Since the dtcp is written in Ruby, you need Ruby installed. If you are using the ports or the pkgsrc, you don't worry about it. Ruby will be installed according to the dependency. However, if you don't use the ports nor the pkgsrc, you need to install Ruby by your self. If you are using NetBSD and planning to install Ruby from the pkg, at least you need to install lang/ruby-base and security/ruby-digest.


All Rights Reserved, Copyright (C) 2004 Hajimu UMEMOTO
Last Modified Jun 8, 2004
ume@mahoroba.org