File: secnet.8

package info (click to toggle)
secnet 0.6.8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,956 kB
  • sloc: ansic: 15,234; python: 1,057; perl: 966; sh: 596; tcl: 484; java: 231; asm: 114; yacc: 89; php: 64; makefile: 48; awk: 40
file content (858 lines) | stat: -rw-r--r-- 24,048 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
.\" Man page for secnet.
.\"
.\" See the secnet.git README, or the Debian copyright file, for full
.\" list of copyright holders.
.\"
.\" secnet is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\" 
.\" secnet is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
.\" General Public License for more details.
.\" 
.\" You should have received a copy of the GNU General Public License
.\" version 3 along with secnet; if not, see
.\" https://www.gnu.org/licenses/gpl.html.
.TH secnet 8

.SH NAME
secnet \- VPN router daemon

.SH SYNOPSIS
\fBsecnet\fR [\fIOPTIONS\fR]

.SH DESCRIPTION
\fBsecnet\fR allows virtual private networks to be constructed
spanning multiple separate sites.

.SH OPTIONS
.TP
.B --verbose\fR, \fB-v
Enable extra diagnostics.
.TP
.B --nowarnings\fR, \fB-w
Suppress warnings.
.TP
.B --help
Display usage message.
.TP
.B --version
Display version string.
.TP
.B --nodetach\fR, \fB-n
Don't go into background.
The default behaviour is to become a daemon during startup.
.TP
.B --silent\fR, \fB--quiet\fR, \fB-f
Suppress error messages.
.TP
.B --debug\fR, \fB-d
Enable debug messages.
.TP
.B --config\fR, \fB-c \fIPATH
Specify configuration file.
The default is \fI/etc/secnet/secnet.conf\fR.
.TP
.B --just-check-config\fR, \fB-j
Check configuration and exit.
.TP
.B --sites-key\fR, \fB-s \fIKEY
Configuration file key defining active sites.
The default is \fBsites\fR.

.SH "CAPABILITY NEGOTIATION"
Sites negotiate with each other during key exchange
in order to determine which cryptographic algorithms and other features
\(en termed
.I capabilities
\(en
they each support.
Capabilities are assigned small integer numbers.
In many cases,
capability numbers can be assigned in the configuration file,
as described below;
but secnet's default assignments will often be satisfactory.
.PP
Capability numbers between 0 and 7 inclusive
are reserved for local use:
secnet will never make use of them without explicit configuration.
This may be useful to migrate from one set of parameters
for a particular cryptographic algorithm
to different, incompatible, parameters for the same algorithm.
Other capability numbers are assigned by default
by various kinds of closures.
See the descriptions below for details.
.PP
It is essential that a capability number mean the same thing
to each of a pair of peers.
It's possible to configure a site
so that it uses different capability numbers for the same feature
when it communicates with different peer sites,
but this is likely to be more confusing than useful.

.SH "CONFIGURATION FILE"
.SS Overview
The default configuration file is \fI/etc/secnet/secnet.conf\fR.
This can be overridden with the \fB--config\fR option.
.PP
The configuration file defines a dictionary (a mapping from keys to
values) of configuration information for secnet.
It is recursive in nature, i.e. values may themselves include dictionaries.
Any node in the nested structure thus defined can be identified by a
\fIpath\fR, which is the sequence of keys necessary to reach it from
the root, separated by "/" characters.
See \fBPaths\fR below for how this is used.
.PP
Furthermore, when a key is looked up in a dictionary, if it cannot be
found, it is sought in the parent dictionary, and so on back to the
root.
For instance, each \fIsite\fR must contain the \fBresolver\fR key, but
in a typical configuration there is no value in having different
resolvers for each site.
Therefore \fBresolver\fR is defined at the root and thus automatically
incorporated into all sites.
.SS Whitespace
Whitespace, including newlines, is ignored except to the extent that
it bounds other symbols.
.PP
Comment begin with "#" and continues to the end of the line.
Comments are ignored.
.SS Inclusion
A file may be recursively included into the configuration file using a
line of the form:
.IP
\fBinclude \fIPATH
.PP
This is handled at a higher level than the main parser and so
precludes the possibility of using the string \fBinclude\fR for any
other purpose.
.\" check if this is true.  it's probably a bug!
.SS Assignments
The configuration file contains one or more assigments.
Each assignment is written:
.IP
\fIkey\fR [\fB=\fR] \fIlist\fR\fB;\fR
.PP
i.e. the equals sign is optional.
The semicolon is mandatory in all contexts.
.PP
Keys start with a letter or "_" and continue with any numbers of
letters, digits, "_" and "-".
.PP
Each \fIkey\fR is a list of one or more \fIvalues\fR, separated by commas.
Possible values types are \fIboolean\fR, \fIstring\fR, \fInumber\fR,
\fIdictionary\fR, \fIpath\fR and \fIclosure evaluation\fR.
.\" This man page draws a distinction between a closure (the thing
.\" evaluated) and a closure evaluation (the closure plus is
.\" arguments).
.SS "Strings"
Strings are contained within "double quotes".
There is (currently) no escape syntax and no way to include quotes
inside strings.
.PP
Example:
.nf
        filename "/var/log/secnet";
.fi
.SS "Numbers"
Numbers are encoded in decimal and do not include a sign.
Numbers must lie in the range 0 to 4294967295.
.PP
Example:
.nf
        mtu 1400;
.fi
.SS "Dictionaries"
.\" In conffile.y dictionaries can be preceded by a search path, but
.\" this is not implemented elsewhere, so not documented here.
Dictionaries consist of one or more assignments, in the same syntax as
given above, enclosed in "{" and "}".
.PP
Example:
.nf
        system {
                userid "secnet";
                pidfile "/var/run/secnet.pid";
        };
.fi
.SS "Paths"
Paths allow a key already defined in the configuration to be aliased.
.PP
Paths consist of a sequence of keys separated by "/".
If the path starts with a "/" then it is an \fIabsolute path\fR and
the search starts at the root of the configuration.
Otherwise it is a \fIrelative path\fR and starts in the containing
dictionary or in any of its parents, down to and including the root.
If there is more than one match, the one furthest from the root "wins".
.PP
The value of a path is the list assigned to the key it refers to.
Lists are flattened; for example if a key is defined as a list of two
paths, and each of those refers to a list of two integers, the
original key is therefore defined to be a list of four integers, not
a list consisting of two lists.
.PP
It is not possible to refer to a \fIlater\fR key using a path.
.PP
Example:
.nf
        vpn {
          test {
            kakajou vpn-data/test/kakajou/kakajou;
            araminta vpn-data/test/araminta/araminta;
            deodand vpn-data/test/deodand/deodand;
            all-sites kakajou,araminta,deodand;
          };
        };
        all-sites vpn/test/all-sites;
.fi
.PP
Here, each of \fBvpn/test/kakajou\fR, \fBvpn/test/araminta\fR and
\fBvpn/test/deodand\fR are defined as aliases to values defined
elsewhere.
\fBvpn/tests/all-sites\fR is defined as the list of all three of those
values, and \fBall-sites\fR is then defined to be an alias for that.
.SS "Booleans"
The (single-element) paths \fBfalse\fR, \fBno\fR and \fBnowise\fR are
predefined and refer to a boolean false value.
Similarly \fBtrue\fR, \fByes\fR and \fBverily\fR point at a boolean
true value.
.PP
In all six cases, variants with just the first letter capitalized, and
with all letters capitalized, are also provided.
.PP
Example:
.nf
        random randomfile("/dev/urandom",no);
.fi
.SS "Closure Evaluation"
Closure evaluation uses the following syntax:
.IP
\fICLOSURE \fB( \fIARGUMENTS \fB)
.PP
\fICLOSURE\fR may be a path referring to a closure, or may itself be a
closure evaluation.
.PP
\fIARGUMENTS\fR is a list of zero or more values, separated by commas.
As a shortcut, if the arguments consist of a single dictionary, the
parentheses may be ommitted:
.IP
\fICLOSURE \fB{ \fR... \fB}
.PP
Example:
.nf
        sites map(site, vpn/test/all-sites);
.fi
.PP
When a closure is evaluated it returns a value (a list, much as above)
and may also have side effects (which may be immediate or may be
deferred to some later phase of execution).
A list of built-in closures is given below.
.SS "Mandatory Keys"
Two keys are mandatory.
\fBsystem\fR must be a dictionary in which the following keys can be
looked up:
.TP
.B log
A \fIlog closure\fR; see the \fBlogfile\fR documentation below.
The destination for log messages.
Mandatory.
.TP
.B userid
A string.
The userid to run as after dropping privilege.
Optional.
.TP
.B pidfile
A string.
The path to write a pidfile.
Optional.
.PP
\fBsites\fR should be a list of \fIsite closures\fR; see the \fBsite\fR documentation below.
This defines the collection of tunnel endpoints that \fBsecnet\fR will
communicate with.
.PP
Recall the recursive lookup logic described in \fBOverview\fR above:
if (for instance) \fBlog\fR is defined in the top level dictionary but
not in \fBsystem\fR, it will nevertheless be found when looked up in
the latter.

.SH CLOSURES
\fBsecnet\fR contains a collection of built-in closures
with names (i.e. single-element paths) given below.
.PP
Most of them return anonymous closures of various types,
which are described contextually.

.SS adns
\fBadns(\fIDICT\fB)\fR => \fIresolver closure\fR
.TP
.I DICT
This either be empty or contain the single key \fBconfig\fR, with a
string value giving configuration to supply to ADNS.
This might be read from a file using \fBreadfile\fR.
.PP
A \fIresolver closure\fR is a means of converting hostnames into
network addresses.

.SS diffie-hellman
.PP
\fBdiffie-hellman(\fIMODULUS\fB, \fIGENERATOR\fR[\fB, \fICHECK\fR]\fB)\fR => \fIdh closure\fR
.TP
.I MODULUS
String.
The prime modulus \fIp\fR in hex.
.TP
.I GENERATOR
String.
The generator \fIg\fR in hex.
.TP
.I CHECK
Boolean.
If \fBtrue\fR (the default) then check if \fIp\fR is prime.
.PP
A \fIdh closure\fR defines a group to be used for key exchange.

.SS logfile
\fBlogfile(\fIDICT\fB)\fR => \fIlog closure\fR
.PP
Valid keys in the \fIDICT\fR argument are:
.TP
.B filename
The path to log to.
.TP
.B class
A list of strings defining which classes of message to log.
The possible message classes are \fBdebug-config\fR,
\fBdebug-phase\fR, \fBdebug\fR, \fBinfo\fR, \fBnotice\fR,
\fBwarning\fR, \fBerror\fR, \fBsecurity\fR and \fBfatal\fR.
.IP
\fBall-debug\fR is the union of all the \fBdebug\fR... classes.
\fBdefault\fR is equivalent to \fBwarning, error, security, fatal\fR.
\fBverbose\fR is equivalent to \fBinfo, notice, warning, error,
security, fatal\fR.
\fBquiet\fR is equivalent to \fBfatal\fR.
.PP
A \fIlog closure\fR is a means of saving log messages.
See also \fBsyslog\fR below.

.SS makelist
\fBmakelist(\fIDICT\fB)\fR => \fILIST\fR
.PP
Returns the (flattened) list of values from the dictionary, discarding
the keys.

.SS map
\fBmap(\fICLOSURE\fB, \fIINPUT\fR...\fB)\fR => \fILIST\fR
.PP
Applies \fICLOSURE\fR to all its additional input arguments and
returns the resulting list.

.SS md5
\fBmd5\fR is a \fIhash closure\fR implementing the MD5 algorithm.

.SS null-netlink
\fBnull-netlink(\fIDICT\fB)\fR => \fInetlink closure\fR
.br
\fBnull-netlink(\fIDICT\fB)\fR => \fIpure closure\fR
.\" TODO pure closure is what it's called internally but this is a
.\" very opaque name to use in docs
.PP
Valid keys in the \fIDICT\fR argument are:
.TP
.B name
String.
The name for the netlink device.
The default is \fBnull-netlink\fR.
.TP
.B networks
List of strings.
The networks on the host side of the netlink device.
.TP
.B remote-networks
List of strings.
Networks that may be claimed by remote sites using this netlink device.
.TP
.B secnet-address
String.
IP address of this netlink.
Incompatible with \fBptp-address\fR.
.TP
.B ptp-address
String.
IP address of the other end of a point-to-point link.
Incompatible with \fBsecnet-address\fR.
.TP
.B mtu
Number.
The MTU of the netlink device.
The default is 1000.
.PP
If \fBptp-address\fR is used then the result is a \fInetlink closure\fR.
This can be used directly with the \fBlink\fR key in the \fBsites\fR
closure (see below).
.PP
If \fBsecnet-address\fR is used then the result is a \fIpure
closure\fR.
This must be evaluated to yield a \fInetlink closure\fR, using a
dictionary argument with the following keys:
.TP
.B routes
String list.
networks reachable via this tunnel, in \fIaddress\fB/\fIbits\fR format.
.TP
.B options
String list.
A list of options:
.RS
.TP
.B allow-route
Allow packets received via this tunnel to be routed down other tunnels
(without this option only packets from the host will be routed).
.TP
.B soft
Remove these routes from the host routing table when the link quality
is 0.
.RE
.TP
.B mtu
Number.
Default MTU over this link.
The default is inherited from the \fIpure closure\fR.
.TP
.B priority
Number.
The priority of this link.
Higher values beat lower values.
The default is 0.

.\" TODO ptp-address turns up in sites.conf, but why?  I think this
.\" is a bug in make-secnet-sites; it is not used by
 \" netlink_inst_create.

.PP
A \fInetlink closure\fR is a virtual IP link, and is supplied to the
\fBlink\fR key of a \fIsite\fR closure.
.PP
The netlink created by \fBnull-netlink\fR has no connection to the
host.
See \fBtun\fR and \fBuserv-ipif\fR below for more useful alternatives.



.SS randomfile
\fBrandomfile(\fIFILENAME\fR[\fB, \fIBLOCKING\fR]\fB)\fR => \fIrandomsource closure\fR
.TP
.I FILENAME
String.
Path to random device, e.g. \fI/dev/urandom\fR.
.TP
.I BLOCKING
Boolean.
\fBTrue\fR if this is a blocking device and \fBfalse\fR otherwise (the default).
Blocking device support is not implemented so this must always be
\fBFalse\fR or absent.
.PP
A \fIrandomsource closure\fR is a source of random numbers.

.SS readfile
\fBreadfile(\fIPATH\fB)\fR => \fISTRING\fR
.PP
Read the contents of the file \fIPATH\fR (a string) and return it as a string.

.SS eax-serpent
\fBeax-serpent(\fIDICT\fB)\fR => \fItransform closure\fR
.PP
Valid keys in the \fIDICT\fR argument are:
.TP
.B max-sequence-skew
The maximum acceptable difference between the sequence number in a
received, decrypted message and the previous one.
The default is 10.
It may be necessary to increase this is if connectivity is poor.
.TP
.B tag-length-bytes
The length of the message authentication tag.  The default is 16,
for a 128-bit tag length.  It must be no longer than the Serpent
blocksize, 16.  Must be have the same value at both ends.
.TP
.B padding-rounding
Messages are padded to a multiple of this many bytes.  This
serves to obscure the exact length of messages.  The default is 16,
.TP
.B capab-num
The capability number to use when advertising this
transform.  The default for serpent-eax is 9.
.PP
A \fItransform closure\fR is a reversible means of transforming
messages for transmission over a (presumably) insecure network.
It is responsible for both confidentiality and integrity.

.SS serpent256-cbc
\fBserpent256-cbc(\fIDICT\fB)\fR => \fItransform closure\fR
.PP
This transform
is deprecated as its security properties are poor; it should be
specified only alongside a better transform such as eax-serpent.
.PP
Valid keys in the \fIDICT\fR argument are:
.TP
.B capab-num
As above.  The default for serpent256-cbc is 8.
.TP
.B max-sequence-skew
As above.
.PP
Note that this uses a big-endian variant of the Serpent block cipher
(which is not compatible with most other Serpent implementations).
.SS rsa-private
\fBrsa-private(\fIPATH\fB\fR[, \fICHECK\fR]\fB)\fR => \fIsigprivkey closure\fR
.TP
.I PATH
String.
The path to a file containing an RSA private key in SSH format
(version 1).
There must be no passphrase.
.TP
.I CHECK
Boolean.
If \fBtrue\fR (the default) then check that the key is valid.

.SS rsa-public
\fBrsa-public(\fIKEY\fB, \fIMODULUS\fB)\fR => \fIsigpubkey closure\fR
.TP
.I KEY
String.
The public key exponent (\fIe\fR), in decimal.
.TP
.I MODULUS
String.
The modulus (\fIn\fR), in decimal.

.SS sha1
\fBsha1\fR is a \fIhash closure\fR implementing the SHA-1 algorithm.

.SS site
\fBsite(\fIDICT\fB)\fR => \fIsite closure\fR
.PP
Valid keys in the \fIDICT\fR argument are:
.TP
.B local-name
String.
The site's name for itself.
.TP
.B name
String.
The name of the site's peer.
.TP
.B link
A \fInetlink closure\fR.
.TP
.B comm
A \fIcomm closure\fR.
.TP
.B resolver
A \fIresolver closure\fR.
.TP
.B random
A \fIrandomsource closure\fR.
.TP
.B local-key
An \fIsigprivkey closure\fR.
The key used to prove our identity to the peer.
.TP
.B address
String.
The DNS name of the peer.
Optional, but if it is missing then it will not be possible to
initiate new connections to the peer.
.TP
.B port
Number.
The port to contact the peer.
.TP
.B key
An \fIsigpubkey closure\fR.
The key used to verify the peer's identity.
.TP
.B transform
One or more \fItransform closures\fR.
Used to protect packets exchanged with the peer.  These should
all have distinct \fBcapab-num\fR values, and the same \fBcapab-num\fR
value should have the same (or a compatible) meaning at both
ends.  The list should be in order of preference, most preferred
first.  (The end which sends MSG1,MSG3 ends up choosing; the ordering
at the other end is irrelevant.)
.TP
.B dh
A \fIdh closure\fR.
The group to use in key exchange.
.TP
.B hash
The hash function used during setup.
.\" TODO clarify what we actually use it for!
.TP
.B key-lifetime
Number.
The maximum lifetime of a session key in milliseconds.
The default is one hour.
.TP
.B setup-retries
Number.
The maximum number of times a key negotiation packet will be
transmitted before giving up.
The default is 5.
.TP
.B setup-timeout
Number.
The time between retransmissions of key negotiation packets, in milliseconds.
The default is one second.
.TP
.B wait-time
Number.
The time to wait after a failed key setup before making another
attempt, in milliseconds.
The default is 20s.
.TP
.B renegotiate-time
Number.
The time after which a new session key will be negotiated, \fIif\fR
there is traffic on the link, in milliseconds.
It must not be greater than the \fBkey-lifetime\fR.
The default 5 minutes less than the key lifetime, unless the lifetime
is less than 10 minutes in which case the default is half the
lifetime.
.TP
.B keepalive
Boolean.
If \fBtrue\fR then attempt to always maintain a live session key.
Not implemented.
.TP
.B log-events
String list.
Types of event to log for this site.
.RS
.TP
.B unexpected
Unexpected key setup packets (including late retransmissions).
.TP
.B setup-init
Start of attempt to setup a session key.
.TP
.B setup-timeout
Failure of attempt to setup a session key, through timeout.
.TP
.B activate-key
Activation of a new session key.
.TP
.B timeout-key
Deletion of current session key through age.
.TP
.B security
Anything potentially suspicious.
.TP
.B state-change
Steps in the key setup protocol.
.TP
.B packet-drop
Whenever we throw away an outgoing packet.
.TP
.B dump-packets
Every key setup packet we see.
.TP
.B errors
Failure of name resolution, internal errors.
.TP
.B all
Everything (too much!)
.RE
.PP
A \fIsite closure\fR defines one site to communicate with.
\fBsecnet\fR expects the (root) key \fBsite\fR to be a list of site
closures.

.SS sysbuffer
\fBsysbuffer(\fR[\fISIZE\fR[\fB, \fIOPTIONS\fR]]\fB)\fR => \fIbuffer closure\fR
.TP
.I SIZE
Number.
The size of the buffer in bytes.
This must be between 64 and 131072.
The default is 4096.
.TP
.I OPTIONS
Dictionary.
Optional and presently unused.
.\" lockdown is accepted but ignored.
.PP
A \fIbuffer closure\fR is a means of buffering packets to send or that
have been received.

.SS syslog
\fBsyslog(\fIDICT\fB)\fR => \fIlog closure\fR
.PP
Valid keys in the \fIDICT\fR argument are:
.TP
.B ident
String.
The ident string to pass to \fBopenlog\fR(3); this value will appear
in each message.
.TP
.B facility
String.
The facility to log as.
The possible values are \fBauthpriv\fR, \fBcron\fR, \fBdaemon\fR,
\fBkern\fR, \fBlocal0\fR-\fB7\fR, \fBlpr\fR, \fBmail\fR, \fBnews\fR,
\fBsyslog\fR, \fBuser\fR and \fBuucp\fR.
.PP
See also \fBlogfile\fR above.

.SS tun
\fBtun(\fIDICT\fB)\fR => \fInetlink closure\fR
.br
\fBtun(\fIDICT\fB)\fR => \fIpure closure\fR
.PP
Valid keys in the \fIDICT\fR argument are those documented for
\fBnull-netlink\fR above, plus:
.TP
.B flavour
String.
The type of TUN interface to use.
Possible values are \fBlinux\fR, \fBbsd\fR, \fBstreams\fR and \fBguess\fR.
The default is \fBguess\fR.
.TP
.B device
String.
The path to the TUN/TAP device file.
The default is \fI/dev/net/tun\fR for the \fBlinux\fR flavour and
\fI/dev/tun\fR for the others.
.TP
.B interface
String.
The interface to use.
The default is to pick one automatically.
This cannot be used with the \fBstreams\fR flavour.
.TP
.B local-address
String.
IP address of the host's tunnel interface.
.\" README says this belongs to netlink-null but actually it's
 \" duplicated between slip & tun
.TP
.B ifconfig-path
String.
The name of the \fBifconfig\fR command.
The default is simply "ifconfig".
.TP
.B route-path
String.
The name of the \fBroute\fR command.
The default is simply "route".
.TP
.B ifconfig-type
String.
The syntax expected by the \fBifconfig\fR command.
Possible values are \fBlinux\fR, \fBbsd\fR, \fBioctl\fR,
\fBsolaris-2.5\fR and \fBguess\fR.
The default is \fBguess\fR.
.TP
.B route-type
String.
The syntax expected by the \fBifconfig\fR command.
Possible values are \fBlinux\fR, \fBbsd\fR, \fBioctl\fR,
\fBsolaris-2.5\fR and \fBguess\fR.
The default is \fBguess\fR.
.TP
.B buffer
A \fIbuffer closure\fR to use for packets transferred from the host to secnet.
The buffer size must be at least 60 greater than the MTU.
.\" TODO rumour has is that buffers are sometimes shareable between
.\" netlink devices - document that if the conditions are reasonable
.\" ones.
.PP
The \fBifconfig-type\fR and \fBroute-type\fR values determine how
those commands are executed.
If they are set to \fBioctl\fR then low-level system calls are used
directly instead of invoking the commands.
.PP
The netlink created by \fBtun\fR uses the \fBtun\fR device to
communicate with the host kernel.

.SS udp
\fBudp(\fIDICT\fB)\fR => \fIcomm closure\fR
.PP
Valid keys in the \fIDICT\fR argument are:
.TP
.B address
String.
The IP address to bind on.
The default is 0.0.0.0, i.e. "any".
.TP
.B port
Number.
The port number to bind to.
The default is 0, i.e. the OS will choose one.
It is suggested that any given VPN agree a common port number.
.TP
.B buffer
A \fIbuffer closure\fR.
See the \fBsysbuffer\fR closure above.
.TP
.B authbind
String.
The path to a helper program to bind the socket.
Optional.
.IP
The program will be invoked with the address and port number as its
arguments, and with the socket to bind as file descriptor 0.
It should either bind the socket as requested, or exit with nonzero
status.
.PP
A \fIcomm closure\fR is a means of sending and receiving messages via
a network.
It does not provide confidentiality, reliablity or availability.

.SS userv-ipif
\fBuserv-ipif(\fIDICT\fB)\fR => \fInetlink closure\fR
.br
\fBuserv-ipif(\fIDICT\fB)\fR => \fIpure closure\fR
.PP
Valid keys in the \fIDICT\fR argument are those documented for
\fBnull-netlink\fR above, plus:
.TP
.B local-address
String.
IP address of the host's SLIP interface.
.\" README says this belongs to netlink-null but actually it's
 \" duplicated between SLIP & tun
.TP
.B userv-path
String.
Where to find \fBuserv\fR(1).
The default is \fB"userv"\fR.
.TP
.B service-user
String.
The name of the user that owns the service.
The default is \fB"root"\fR.
.TP
.B service-name
String.
The name of the service to request.
The default is \fB"ipif"\fR.
.TP
.B buffer
A \fIbuffer closure\fR to use for packets transferred from the host to secnet.
.PP
The netlink created by \fBuserv-ipif\fR invokes the specified \fBuserv\fR service with pipes connected to its standard input and output.
It uses SLIP to communicate with the host kernel via these pipes.

.SH FILES
.TP
.I /etc/secnet/secnet.conf
Configuration file.

.SH "SEE ALSO"
\fBuserv\fR(1)