xref: /freebsd/sbin/nos-tun/nos-tun.8 (revision a35d88931c87cfe6bd38f01d7bad22140b3b38f3)
1.\"
2.\" ----------------------------------------------------------------------------
3.\" "THE BEER-WARE LICENSE" (Revision 42):
4.\" <phk@FreeBSD.org> wrote this file.  As long as you retain this notice you
5.\" can do whatever you want with this stuff. If we meet some day, and you think
6.\" this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7.\" ----------------------------------------------------------------------------
8.\"
9.\" $FreeBSD$
10.\"
11.Dd April 11, 1998
12.Dt NOS-TUN 8
13.Os
14.Sh NAME
15.Nm nos-tun
16.Nd implement ``nos'' or ``ka9q'' style IP over IP tunnel
17.Sh SYNOPSIS
18.Nm
19.Fl t
20.Ar tunnel
21.Fl s
22.Ar source
23.Fl d
24.Ar destination
25.Fl p
26.Ar protocol_number
27.Ar target
28.Sh DESCRIPTION
29The
30.Nm
31utility is used to establish an
32.Em nos
33style tunnel, (also known as
34.Em ka9q
35or
36.Em IP-IP
37tunnel) using a
38.Xr tun 4
39kernel interface.
40.Pp
41.Ar Tunnel
42is the name of the tunnel device
43.Pa /dev/tun0
44for example.
45.Pp
46.Ar Source
47and
48.Ar destination
49are the addresses used on the tunnel device.
50If you configure the tunnel against a cisco router, use a netmask of
51.Dq 255.255.255.252
52on the cisco.
53This is because the tunnel is a point-to-point interface
54in the
55.Fx
56end, a concept cisco doesn't really implement.
57.Pp
58.Ar Protocol number
59sets tunnel mode.
60Original KA9Q NOS uses 94 but many people use 4
61on the worldwide backbone of ampr.org.
62.Pp
63.Ar Target
64is the address of the remote tunnel device, this must match the source
65address set on the remote end.
66.Sh EXAMPLES
67This end, a
68.Fx
69box on address 192.168.59.34:
70.Bd -literal -offset indent
71nos-tun -t /dev/tun0 -s 192.168.61.1 -d 192.168.61.2 192.168.56.45
72.Ed
73.Pp
74Remote cisco on address 192.168.56.45:
75.Bd -literal -offset indent
76interface tunnel 0
77ip address 192.168.61.2 255.255.255.252
78tunnel mode nos
79tunnel destination 192.168.59.34
80tunnel source 192.168.56.45
81.Ed
82.Sh BUGS
83We don't allow for setting our source address for multihomed machines.
84.Sh AUTHORS
85.An -nosplit
86.An Nickolay N. Dudorov Aq nnd@itfs.nsk.su
87wrote the program,
88.An Poul-Henning Kamp Aq phk@FreeBSD.org
89wrote the man-page.
90.An Isao SEKI Aq iseki@gongon.com
91added a new flag, IP protocol number.
92