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