.\" Copyright (c) 2003-2006 Hajimu UMEMOTO .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the project nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $Mahoroba: src/dtcpclient/dtcpclient.8,v 1.7 2006/05/25 16:36:21 ume Exp $ .\" .Dd May 25, 2006 .Dt DTCPCLIENT 8 .Os .\" .Sh NAME .Nm dtcpclient .Nd Dynamic Tunnel Configuration Protocol client .\" .Sh SYNOPSIS .Nm dtcpclient .Op Fl b Ar udp-port .Op Fl B Ar nat-port .Op Fl d .Op Fl D .Op Fl f Ar pidfile .Op Fl l .Op Fl m Ar mtu .Op Fl n .Op Fl p Ar port .Op Fl s Ar script .Op Fl t Ar tuntype .Op Fl u Ar user .Op Fl U .Ar server .\" .Sh DESCRIPTION .Nm implements Dynamic Tunnel Configuration Protocol .Pq DTCP for short proposed by Trumpet. .Nm will first ask the DTCP password to the user. Then, the program will try to connect DTCP server via IPv4 TCP, login as DTCP client, and maintain IPv6 over IPv4 tunnel connection. .Pp The following options are available: .Bl -tag -width indent .It Fl b Ar port Sets the port number to bind on local for an UDP tunnel to .Ar port . The default is .Dq 4028 . .It Fl B Ar port If you are behind NAT which is statically configured to forward the UDP tunnel traffic arrived to the specific port, sets the port number to .Ar port . This option is meaningful only with .Fl U option, and is usually used with .Fl n . The default is not defined. .It Fl D .Nm becomes daemon. .It Fl d Put .Nm to debug mode. .It Fl f Ar file If .Nm is invoked as daemon, the process ID of the .Nm are held in .Pa /var/run/dtcpclient.pid by default. You may want to change the file name. .It Fl l By default, when connection to the server is closed, .Nm will exit. When this option is specified, .Nm doesn't exit on connection close, and continuously tries to re-connect. .It Fl m Ar mtu Sets the MTU of the tunnel to .Ar mtu . The default is .Dq 1280 . .It Fl n By default, .Nm checks if the IPv4 address which DTCP server recognized is equal to the actuall IPv4 address of your box. This check can be ommitted by specifying this option. It may save the user lives behind NAT that maps private IPv4 address to global IPv4 address. .It Fl p Ar port Sets the port number to .Ar port . The default is .Dq 20200 . .It Fl s Ar script Specify the command to invoke on DTCP session is established or closed. The default is .Pa /usr/local/etc/dtcpclient.script . .It Fl t Ar tuntype The spec defines several kind of tunnel requests. .Nm will request tunnel typed .Ar tuntype to the DTCP server. .Dq Li tunnelonly , .Dq Li host and .Dq Li network are available for .Ar tuntype . The default value is .Dq Li tunnelonly . .It Fl u Ar user Specifies the user. It is needed when DTCP user account is different from the login name on the host. .It Fl U By default, .Nm creates a generic tunnel. If this option is set, .Nm creates an IPv6 over an UDP/IPv4 tunnel instead. An IPv6 over an UDP/IPv4 tunnel requires .Li Netgraph . (Experimental) .It Ar server DTCP server which .Nm try to connect. .El .Pp Upon receipt of signal .Dv SIGHUP , .Nm will try to reconnect to the DTCP server. .\" .Sh RETURN VALUES .Nm will exit with positive value on errors. .\" .Sh PARAMETERS PASSED TO SCRIPTS The invoked scripts get passed these parameters: .Bl -tag -width destination .It Ar state Why this script is called. Possible .Em state are .Dq up and .Dq down . .It Ar server DTCP server which .Nm connect to. .It Ar myaddr My actuall IPv4 address. .It Ar tuntype The tunnel type. The value is one of .Dq Li tunnelonly , .Dq Li host or .Dq Li network .It Ar me My IPv4 address which DTCP server recognize. .It Ar her The destination IPv4 address of the tunnel. .It Ar me6 The IPv6 address for local tunnel end point if this is a .Dq host tunnel type or numbered tunnel when tunnel type is .Dq network . .It Ar her6 The IPv6 address for remote tunnel end point if this is a .Dq host tunnel type or numbered tunnel when tunnel type is .Dq network . .It Ar prefix The IPv6 prefix assigned to local network when this is a .Dq network tunnel type . .El .\" .Sh FILES .Bl -tag -width " " -compact .It Pa /usr/local/etc/dtcpclient.auth You can specify your password to connect to DTCP server in this file. If your password is found in this file, .Nm does not ask for your password. The format is a colon-separated list of the server name, the user name and the password. .It Pa /usr/local/etc/dtcpclient.script Default script invoked for setup or cleanup tunnel when DTCP session is established or closed. .It Pa /var/run/dtcpclient.pid Contains the process ID of the .Nm listening for connections. The content of this file is not sensitive; it can be world-readable. This file name may be changed by .Fl f option. .El .Sh SEE ALSO .Xr dtcps 8 .\" .Sh AUTHOR .An Hajimu UMEMOTO Aq ume@mahoroba.org . .\" .Sh BUGS .Nm will not work if you are behind a NAT box .Po This is a protocol feature, not a bug .Pc . .Fl n may help you on such case. But, it is still depend on the behavior of your NAT box.