DTCP Server -- dtcps

Configuring dtcps

- Invokation

The command line to invoke dtcps is like following:
dtcps -i gif10
Use tunnel interfaces from gif10 (-i)

If you installed dtcp from the FreeBSD ports, /usr/local/etc/rc.d/dtcps.sh is installed. Since if you installed dtcp from the NetBSD pkgsrc, /usr/pkg/etc/rc.d/dtcps is installed, please copy it into /etc/rc.d. In these cases, to invoke dtcps at boot, add following two lines into /etc/rc.conf:

dtcps_enable="YES"
dtcps_tunif="gif10"
If you installed the rc script for NetBSD, above are also applicable for NetBSD.

If your OS supports the virtual interface creation (ifconfig create/destroy); that is TUNIF_CLONING = true, please spacify a tunnel interface which has minimum unit number within the tunnel interfaces you are planning to use for serving tunnels. For example, if you specify `-i gif10', the interfaces will be used as gif10, gif11, gif12, ...
If TUNIF_CLONING = false or -c option is specified, you need to specify the tunnel interfaces using regular expression. For example, if you wish to use gif10 - gif99, specify `-i 'gif[1-9][0-9]''. In this case, these interfaces are need to be ready for use.

With this condition, you can serve tunnelonly tunnel type. In addition, if you have routetable (described below), dtcps will accept the requests with network tunnel type. If you wish to serve host tunnel type, too, specify a prefix with prefix length is /64 to dtcps_prefix like:

dtcps_prefix="3ffe:505:2:f000::"
In this case, when a client requests with host tunnel type, dtcps will assign an IPv6 address within the specified prefix.

- Registering Your Users

You can use qpopauth included in the qpopper package or dtcpauth to regist your users. The ordinary user can change his password using the qpopauth command. However, dtcpauth reqires root privilege to change a password. Here, I'll assume to use dtcpauth.

1st, create authentication database by executing `dtcpauth --init'. When you want to regist your user or change the password of your user who's name is hoge, execute `dtcpauth --user hoge', and answer a question for his password. To delete user hoge, execute `dtcpauth --delete hoge'. You can get a list of the registered users by executing `dtcpauth --list ALL'.

The location of an authentication database is /usr/local/etc/qpopper/pop.auth under FreeBSD, and /usr/pkg/etc/apop.auth under NetBSD by default.

- Registering a Prefix for Your User

When you are planning to enable a service for network tunnel type, register the prefixes to assign your users into /usr/local/etc/routetable (/usr/pkg/etc/routetable if you installed the dtcp using pkgsrc). The routetable is an ordinary plain text file. You can edit it using your favorite editor. A user and a prefix is separated by TAB like as following example:
hoge		3ffe:505:9000::/48
fuga		3ffe:505:9001::/48

You don't need to restart dtcps even when you register or change the databases.


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