xref: /freebsd/sbin/nos-tun/nos-tun.8 (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
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.Op Ar source
28.Ar target
29.Sh DESCRIPTION
30The
31.Nm
32utility is used to establish an
33.Em nos
34style tunnel, (also known as
35.Em ka9q
36or
37.Em IP-IP
38tunnel) using a
39.Xr tun 4
40kernel interface.
41.Pp
42.Ar Tunnel
43is the name of the tunnel device
44.Pa /dev/tun0
45for example.
46.Pp
47.Ar Source
48and
49.Ar destination
50are the addresses used on the tunnel device.
51If you configure the tunnel against a cisco router, use a netmask of
52.Dq 255.255.255.252
53on the cisco.
54This is because the tunnel is a point-to-point interface
55in the
56.Fx
57end, a concept cisco does not really implement.
58.Pp
59.Ar Protocol number
60sets tunnel mode.
61Original KA9Q NOS uses 94 but many people use 4
62on the worldwide backbone of ampr.org.
63.Pp
64.Ar Target
65is the address of the remote tunnel device, this must match the source
66address set on the remote end.
67.Sh EXAMPLES
68This end, a
69.Fx
70box on address 192.168.59.34:
71.Bd -literal -offset indent
72nos-tun -t /dev/tun0 -s 192.168.61.1 -d 192.168.61.2 192.168.56.45
73.Ed
74.Pp
75Remote cisco on address 192.168.56.45:
76.Bd -literal -offset indent
77interface tunnel 0
78ip address 192.168.61.2 255.255.255.252
79tunnel mode nos
80tunnel destination 192.168.59.34
81tunnel source 192.168.56.45
82.Ed
83.Sh AUTHORS
84.An -nosplit
85.An Nickolay N. Dudorov Aq nnd@itfs.nsk.su
86wrote the program,
87.An Poul-Henning Kamp Aq phk@FreeBSD.org
88wrote the man-page.
89.An Isao SEKI Aq iseki@gongon.com
90added a new flag, IP protocol number.
91.Sh BUGS
92We do not allow for setting our source address for multihomed machines.
93