Import release 0.1.1
[secnet] / example.conf
CommitLineData
df1b18fc
SE
1# secnet example configuration file
2
3# Log facility
4log logfile("secnet","local2"); # Not yet implemented, goes to stderr
5
6# Systemwide configuration (all other configuration is per-site):
7# log a log facility for program messages
8# userid who we try to run as after setup
9# pidfile
10system {
11 userid "secnet";
12 pidfile "/var/run/secnet.pid";
13};
14
15# Parameters for each remote site (arguments to the site() closure):
16# things we configure locally
17# buffer buffer for constructing/sending/receiving packets
18# netlink user/kernel netlink device for this tunnel
19# comm UDP communication
20# resolver resolver to use for name lookups
21# log a log destination for this connection
22# log-events string list: which events we log
23# random a source of randomness
24
25# our local configuration visible to the outside world
26# local-name string: how we identify ourselves to them
27# local-key our own private RSA key
28# local-port port number we listen on
29
30# their configuration visible to us
31# name string: how they identify themselves
32# address string: use with resolver to find their IP address
33# networks string list: their networks for us
34# key the remote site's RSA public key
35# port port we send to to contact remote site
36
37# things both ends must agree on
38# transform routine for bulk encryption
39# dh Diffie-Hellman parameters
40# hash secure hash function
41
42# things both ends ought to agree on, but don't have to
43# key-lifetime max session key lifetime, in milliseconds
44# setup-retries max retransmits of a key setup packet
45# setup-timeout wait between retransmits of key setup packets, in ms
46# wait-time wait between unsuccessful key setup attempts, in ms
47
48# Use the universal TUN/TAP driver to get packets to and from the kernel
59635212 49# (use tun-old if you are not on Linux-2.4)
df1b18fc
SE
50netlink tun {
51 name "netlink-tun"; # Printed in log messages from this netlink
52# interface "tun0"; # You may set your own interface name if you wish;
53 # if you don't one will be chosen for you.
54
55 # local networks served by this netlink device
56 # incoming tunneled packets for other networks will be discarded
57 networks "192.168.x.x/24", "192.168.x.x/24", "172.x.x.x/24";
58 local-address "192.168.x.x"; # IP address of host's tunnel interface
59 secnet-address "192.168.x.x"; # IP address of this secnet
60
61 # MTU of the tunnel interface. Should be kept under the path-MTU
62 # (by at least 60 bytes) between this secnet and its peers for
63 # optimum performance.
64 mtu 1400;
65
66 # This buffer is used to pass incoming packets onto the 'site'
67 # module. It should be at least as big as the MTU plus 60 bytes.
68 # Buffers can sometimes be shared between netlink devices - see
69 # full documentation for more details. (XXX TODO)
70 buffer sysbuffer(2048);
71};
72
73# Alternatively (or additionally, if you like) use userv-ipif to get
74# packets to and from the kernel.
75#netlink userv-ipif {
76# name "netlink-userv-ipif";
77# # userv-path "/usr/bin/userv";
78# # service-user "root";
79# # service-name "ipif";
80# networks "whatever";
81# local-address "whatever";
82# secnet-address "whatever";
83# mtu 1400;
84# buffer sysbuffer(2048);
85#};
86
87# This defines the port that this instance of secnet will listen on, and
88# originate packets on. It does not _have_ to correspond to the advertised
89# port for your site: you may be doing network address translation, for
90# example. You need to arrange that any UDP packets sent to the advertised
91# host and port for your site end up on this machine at the port you
92# specify here.
93comm udp {
94 port xxxx;
95 buffer sysbuffer(4096);
96};
97
98# The resolver is used to look up IP addresses from the DNS names provided
99# in the sites file. You may specify an alternative resolv.conf for
100# ADNS here if you wish.
101resolver adns {
102# config=readfile("/etc/secnet/adns.conf");
103};
104
105# log is defined earlier - we share it with the system
106log-events "init","up","down"; # XXX not yet used
107
108# A source of random bits for nonces and session keys. The 'no' specifies
109# that it's non-blocking. XXX 'yes' isn't implemented yet.
110random randomfile("/dev/urandom",no);
111
112local-name "your-site-name";
113local-key rsa-private("/etc/secnet/key");
114
115# On dodgy links you may want to specify a higher maximum sequence number skew
116transform serpent256-cbc {
117 max-sequence-skew 10;
118};
119
120include /etc/secnet/sites
121
122# Here you must list all the VPN sites that you wish to communicate with.
123# The /etc/secnet/sites file contains information on all reachable sites;
124# if the site you want to communicate with isn't listed, you should get
125# a newer version. MAKE SURE YOU GET AN AUTHENTIC COPY OF THE FILE - it
126# contains public keys for all sites.
127
974d0468
SE
128# Do not include your own site in this list!
129
df1b18fc
SE
130sites
131 site(example-vpn/some-site),
132 site(example-vpn/some-other-site),
133 site(example-vpn/a-third-site);