1*4882a593Smuzhiyun# This is a sample configuration file for freeDiameter daemon.
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun# Most of the options can be omitted, as they default to reasonable values.
4*4882a593Smuzhiyun# Only TLS-related options must be configured properly in usual setups.
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun# It is possible to use "include" keyword to import additional files
7*4882a593Smuzhiyun# e.g.: include "/etc/freeDiameter.d/*.conf"
8*4882a593Smuzhiyun# This is exactly equivalent as copy & paste the content of the included file(s)
9*4882a593Smuzhiyun# where the "include" keyword is found.
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun##############################################################
13*4882a593Smuzhiyun##  Peer identity and realm
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun# The Diameter Identity of this daemon.
16*4882a593Smuzhiyun# This must be a valid FQDN that resolves to the local host.
17*4882a593Smuzhiyun# Default: hostname's FQDN
18*4882a593Smuzhiyun#Identity = "aaa.koganei.freediameter.net";
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun# The Diameter Realm of this daemon.
21*4882a593Smuzhiyun# Default: the domain part of Identity (after the first dot).
22*4882a593Smuzhiyun#Realm = "koganei.freediameter.net";
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun##############################################################
25*4882a593Smuzhiyun##  Transport protocol configuration
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun# The port this peer is listening on for incoming connections (TCP and SCTP).
28*4882a593Smuzhiyun# Default: 3868. Use 0 to disable.
29*4882a593Smuzhiyun#Port = 3868;
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun# The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP).
32*4882a593Smuzhiyun# See TLS_old_method for more information about TLS flavours.
33*4882a593Smuzhiyun# Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter.
34*4882a593Smuzhiyun# Default: 5868. Use 0 to disable.
35*4882a593Smuzhiyun#SecPort = 5868;
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun# Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed
38*4882a593Smuzhiyun# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the
39*4882a593Smuzhiyun# CER/CEA exchange on a dedicated secure port.
40*4882a593Smuzhiyun# This parameter only affects outgoing connections.
41*4882a593Smuzhiyun# The setting can be also defined per-peer (see Peers configuration section).
42*4882a593Smuzhiyun# Default: use RFC6733 method with separate port for TLS.
43*4882a593Smuzhiyun#TLS_old_method;
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun# Disable use of TCP protocol (only listen and connect over SCTP)
46*4882a593Smuzhiyun# Default : TCP enabled
47*4882a593Smuzhiyun#No_TCP;
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun# Disable use of SCTP protocol (only listen and connect over TCP)
50*4882a593Smuzhiyun# Default : SCTP enabled
51*4882a593Smuzhiyun#No_SCTP;
52*4882a593Smuzhiyun# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option.
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun# Prefer TCP instead of SCTP for establishing new connections.
55*4882a593Smuzhiyun# This setting may be overwritten per peer in peer configuration blocs.
56*4882a593Smuzhiyun# Default : SCTP is attempted first.
57*4882a593Smuzhiyun#Prefer_TCP;
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun# Default number of streams per SCTP associations.
60*4882a593Smuzhiyun# This setting may be overwritten per peer basis.
61*4882a593Smuzhiyun# Default : 30 streams
62*4882a593Smuzhiyun#SCTP_streams = 30;
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun##############################################################
65*4882a593Smuzhiyun##  Endpoint configuration
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun# Disable use of IP addresses (only IPv6)
68*4882a593Smuzhiyun# Default : IP enabled
69*4882a593Smuzhiyun#No_IP;
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun# Disable use of IPv6 addresses (only IP)
72*4882a593Smuzhiyun# Default : IPv6 enabled
73*4882a593Smuzhiyun#No_IPv6;
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun# Specify local addresses the server must bind to
76*4882a593Smuzhiyun# Default : listen on all addresses available.
77*4882a593Smuzhiyun#ListenOn = "202.249.37.5";
78*4882a593Smuzhiyun#ListenOn = "2001:200:903:2::202:1";
79*4882a593Smuzhiyun#ListenOn = "fe80::21c:5ff:fe98:7d62%eth0";
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun##############################################################
83*4882a593Smuzhiyun##  Server configuration
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun# How many Diameter peers are allowed to be connecting at the same time ?
86*4882a593Smuzhiyun# This parameter limits the number of incoming connections from the time
87*4882a593Smuzhiyun# the connection is accepted until the first CER is received.
88*4882a593Smuzhiyun# Default: 5 unidentified clients in paralel.
89*4882a593Smuzhiyun#ThreadsPerServer = 5;
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun##############################################################
92*4882a593Smuzhiyun##  TLS Configuration
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun# TLS is managed by the GNUTLS library in the freeDiameter daemon.
95*4882a593Smuzhiyun# You may find more information about parameters and special behaviors
96*4882a593Smuzhiyun# in the relevant documentation.
97*4882a593Smuzhiyun# http://www.gnu.org/software/gnutls/manual/
98*4882a593Smuzhiyun
99*4882a593Smuzhiyun# Credentials of the local peer
100*4882a593Smuzhiyun# The X509 certificate and private key file to use for the local peer.
101*4882a593Smuzhiyun# The files must contain PKCS-1 encoded RSA key, in PEM format.
102*4882a593Smuzhiyun# (These parameters are passed to gnutls_certificate_set_x509_key_file function)
103*4882a593Smuzhiyun# Default : NO DEFAULT
104*4882a593Smuzhiyun#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>";
105*4882a593Smuzhiyun#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key";
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun# Certificate authority / trust anchors
108*4882a593Smuzhiyun# The file containing the list of trusted Certificate Authorities (PEM list)
109*4882a593Smuzhiyun# (This parameter is passed to gnutls_certificate_set_x509_trust_file function)
110*4882a593Smuzhiyun# The directive can appear several times to specify several files.
111*4882a593Smuzhiyun# Default : GNUTLS default behavior
112*4882a593Smuzhiyun#TLS_CA = "<file.PEM>";
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun# Certificate Revocation List file
115*4882a593Smuzhiyun# The information about revoked certificates.
116*4882a593Smuzhiyun# The file contains a list of trusted CRLs in PEM format. They should have been verified before.
117*4882a593Smuzhiyun# (This parameter is passed to gnutls_certificate_set_x509_crl_file function)
118*4882a593Smuzhiyun# Note: openssl CRL format might have interoperability issue with GNUTLS format.
119*4882a593Smuzhiyun# Default : GNUTLS default behavior
120*4882a593Smuzhiyun#TLS_CRL = "<file.PEM>";
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun# GNU TLS Priority string
123*4882a593Smuzhiyun# This string allows to configure the behavior of GNUTLS key exchanges
124*4882a593Smuzhiyun# algorithms. See gnutls_priority_init function documentation for information.
125*4882a593Smuzhiyun# You should also refer to the Diameter required TLS support here:
126*4882a593Smuzhiyun#   http://tools.ietf.org/html/rfc6733#section-13.1
127*4882a593Smuzhiyun# Default : "NORMAL"
128*4882a593Smuzhiyun# Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL";
129*4882a593Smuzhiyun#TLS_Prio = "NORMAL";
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun# Diffie-Hellman parameters size
132*4882a593Smuzhiyun# Set the number of bits for generated DH parameters
133*4882a593Smuzhiyun# Valid value should be 768, 1024, 2048, 3072 or 4096.
134*4882a593Smuzhiyun# (This parameter is passed to gnutls_dh_params_generate2 function,
135*4882a593Smuzhiyun# it usually should match RSA key size)
136*4882a593Smuzhiyun# Default : 1024
137*4882a593Smuzhiyun#TLS_DH_Bits = 1024;
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun# Alternatively, you can specify a file to load the PKCS#3 encoded
140*4882a593Smuzhiyun# DH parameters directly from. This accelerates the daemon start
141*4882a593Smuzhiyun# but is slightly less secure. If this file is provided, the
142*4882a593Smuzhiyun# TLS_DH_Bits parameters has no effect.
143*4882a593Smuzhiyun# Default : no default.
144*4882a593Smuzhiyun#TLS_DH_File = "<file.PEM>";
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun
147*4882a593Smuzhiyun##############################################################
148*4882a593Smuzhiyun##  Timers configuration
149*4882a593Smuzhiyun
150*4882a593Smuzhiyun# The Tc timer of this peer.
151*4882a593Smuzhiyun# It is the delay before a new attempt is made to reconnect a disconnected peer.
152*4882a593Smuzhiyun# The value is expressed in seconds. The recommended value is 30 seconds.
153*4882a593Smuzhiyun# Default: 30
154*4882a593Smuzhiyun#TcTimer = 30;
155*4882a593Smuzhiyun
156*4882a593Smuzhiyun# The Tw timer of this peer.
157*4882a593Smuzhiyun# It is the delay before a watchdog message is sent, as described in RFC 3539.
158*4882a593Smuzhiyun# The value is expressed in seconds. The default value is 30 seconds. Value must
159*4882a593Smuzhiyun# be greater or equal to 6 seconds. See details in the RFC.
160*4882a593Smuzhiyun# Default: 30
161*4882a593Smuzhiyun#TwTimer = 30;
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun##############################################################
164*4882a593Smuzhiyun##  Applications configuration
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun# Disable the relaying of Diameter messages?
167*4882a593Smuzhiyun# For messages not handled locally, the default behavior is to forward the
168*4882a593Smuzhiyun# message to another peer if any is available, according to the routing
169*4882a593Smuzhiyun# algorithms. In addition the "0xffffff" application is advertised in CER/CEA
170*4882a593Smuzhiyun# exchanges.
171*4882a593Smuzhiyun# Default: Relaying is enabled.
172*4882a593Smuzhiyun#NoRelay;
173*4882a593Smuzhiyun
174*4882a593Smuzhiyun# Number of server threads that can handle incoming messages at the same time.
175*4882a593Smuzhiyun# Default: 4
176*4882a593Smuzhiyun#AppServThreads = 4;
177*4882a593Smuzhiyun
178*4882a593Smuzhiyun# Other applications are configured by loaded extensions.
179*4882a593Smuzhiyun
180*4882a593Smuzhiyun##############################################################
181*4882a593Smuzhiyun##  Extensions configuration
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun#  The freeDiameter framework merely provides support for
184*4882a593Smuzhiyun# Diameter Base Protocol. The specific application behaviors,
185*4882a593Smuzhiyun# as well as advanced functions, are provided
186*4882a593Smuzhiyun# by loadable extensions (plug-ins).
187*4882a593Smuzhiyun#  These extensions may in addition receive the name of a
188*4882a593Smuzhiyun# configuration file, the format of which is extension-specific.
189*4882a593Smuzhiyun#
190*4882a593Smuzhiyun# Format:
191*4882a593Smuzhiyun#LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ;
192*4882a593Smuzhiyun#
193*4882a593Smuzhiyun# Examples:
194*4882a593Smuzhiyun#LoadExtension = "extensions/sample.fdx";
195*4882a593Smuzhiyun#LoadExtension = "extensions/sample.fdx":"conf/sample.conf";
196*4882a593Smuzhiyun
197*4882a593Smuzhiyun# Extensions are named as follow:
198*4882a593Smuzhiyun# dict_* for extensions that add content to the dictionary definitions.
199*4882a593Smuzhiyun# dbg_*  for extensions useful only to retrieve more information on the framework execution.
200*4882a593Smuzhiyun# acl_*  : Access control list, to control which peers are allowed to connect.
201*4882a593Smuzhiyun# rt_*   : routing extensions that impact how messages are forwarded to other peers.
202*4882a593Smuzhiyun# app_*  : applications, these extensions usually register callbacks to handle specific messages.
203*4882a593Smuzhiyun# test_* : dummy extensions that are useful only in testing environments.
204*4882a593Smuzhiyun
205*4882a593Smuzhiyun
206*4882a593Smuzhiyun# The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some
207*4882a593Smuzhiyun# information about some events. This extension does not actually use a configuration file
208*4882a593Smuzhiyun# but receives directly a parameter in the string passed to the extension. Here are some examples:
209*4882a593Smuzhiyun## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors.
210*4882a593Smuzhiyun## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details.
211*4882a593Smuzhiyun## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages.
212*4882a593Smuzhiyun# The four digits respectively control: connections, routing decisions, sent/received messages, errors.
213*4882a593Smuzhiyun# The values for each digit are:
214*4882a593Smuzhiyun#  0 - default - keep the default behavior
215*4882a593Smuzhiyun#  1 - quiet   - remove any specific log
216*4882a593Smuzhiyun#  2 - compact - display only a summary of the information
217*4882a593Smuzhiyun#  4 - full    - display the complete information on a single long line
218*4882a593Smuzhiyun#  8 - tree    - display the complete information in an easier to read format spanning several lines.
219*4882a593Smuzhiyun
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun##############################################################
222*4882a593Smuzhiyun##  Peers configuration
223*4882a593Smuzhiyun
224*4882a593Smuzhiyun#  The local server listens for incoming connections. By default,
225*4882a593Smuzhiyun# all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl).
226*4882a593Smuzhiyun#
227*4882a593Smuzhiyun#  In addition to incoming connections, the local peer can
228*4882a593Smuzhiyun# be configured to establish and maintain connections to some
229*4882a593Smuzhiyun# Diameter nodes and allow connections from these nodes.
230*4882a593Smuzhiyun#  This is achieved with the ConnectPeer directive described below.
231*4882a593Smuzhiyun#
232*4882a593Smuzhiyun# Note that the configured Diameter Identity MUST match
233*4882a593Smuzhiyun# the information received inside CEA, or the connection will be aborted.
234*4882a593Smuzhiyun#
235*4882a593Smuzhiyun# Format:
236*4882a593Smuzhiyun#ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ;
237*4882a593Smuzhiyun# Parameters that can be specified in the peer's parameter list:
238*4882a593Smuzhiyun#  No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method;
239*4882a593Smuzhiyun#  No_TLS;       # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions).
240*4882a593Smuzhiyun#  Port = 5868;  # The port to connect to
241*4882a593Smuzhiyun#  TcTimer = 30;
242*4882a593Smuzhiyun#  TwTimer = 30;
243*4882a593Smuzhiyun#  ConnectTo = "202.249.37.5";
244*4882a593Smuzhiyun#  ConnectTo = "2001:200:903:2::202:1";
245*4882a593Smuzhiyun#  TLS_Prio = "NORMAL";
246*4882a593Smuzhiyun#  Realm = "realm.net"; # Reject the peer if it does not advertise this realm.
247*4882a593Smuzhiyun# Examples:
248*4882a593Smuzhiyun#ConnectPeer = "aaa.wide.ad.jp";
249*4882a593Smuzhiyun#ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ;
250*4882a593Smuzhiyun##############################################################
251