Let's also include aclocal.m4
[asterisk-bristuff.git] / doc / security.txt
blob3adf53624e957862be36879d4668a2d6ebd67736
1 ==== Security Notes with Asterisk ====
3 PLEASE READ THE FOLLOWING IMPORTANT SECURITY RELATED INFORMATION.  
4 IMPROPER CONFIGURATION OF ASTERISK COULD ALLOW UNAUTHORIZED USE OF YOUR
5 FACILITIES, POTENTIALLY INCURRING SUBSTANTIAL CHARGES.
7 Asterisk security involves both network security (encryption, authentication)
8 as well as dialplan security (authorization - who can access services in 
9 your pbx). If you are setting up Asterisk in production use, please make
10 sure you understand the issues involved.
12 * NETWORK SECURITY
14 If you install Asterisk and use the "make samples" command to install
15 a demonstration configuration, Asterisk will open a few ports for accepting
16 VoIP calls. Check the channel configuration files for the ports and IP addresses.
18 If you enable the manager interface in manager.conf, please make sure that
19 you access manager in a safe environment or protect it with SSH or other
20 VPN solutions.
22 For all TCP/IP connections in Asterisk, you can set ACL lists that
23 will permit or deny network access to Asterisk services. Please check
24 the "permit" and "deny" configuration options in manager.conf and
25 the VoIP channel configurations - i.e. sip.conf and iax.conf.
27 The IAX2 protocol supports strong RSA key authentication as well as
28 AES encryption of voice and signalling. The SIP channel does not
29 support encryption in this version of Asterisk.
31 By default, if you have libcap available, Asterisk will try to retain the
32 CAP_NET_ADMIN capability when running as a non-root user. If you do not need
33 that capability you may want to configure Asterisk with --without-cap; however,
34 this will prevent Asterisk from being able to mark high ToS bits under Linux.
35 More information on CAP_NET_ADMIN is available at:
36 http://www.lids.org/lids-howto/node48.html
38 * DIALPLAN SECURITY
40 First and foremost remember this:
42 USE THE EXTENSION CONTEXTS TO ISOLATE OUTGOING OR TOLL SERVICES FROM ANY
43 INCOMING CONNECTIONS.
45 You should consider that if any channel, incoming line, etc can enter an
46 extension context that it has the capability of accessing any extension
47 within that context. 
49 Therefore, you should NOT allow access to outgoing or toll services in
50 contexts that are accessible (especially without a password) from incoming
51 channels, be they IAX channels, FX or other trunks, or even untrusted
52 stations within you network.  In particular, never ever put outgoing toll
53 services in the "default" context.  To make things easier, you can include
54 the "default" context within other private contexts by using:
56         include => default
58 in the appropriate section.  A well designed PBX might look like this:
60 [longdistance]
61 exten => _91NXXNXXXXXX,1,Dial(Zap/g2/${EXTEN:1})
62 include => local
64 [local]
65 exten => _9NXXNXXX,1,Dial(Zap/g2/${EXTEN:1})
66 include => default
68 [default]
69 exten => 6123,Dial(Zap/1)
72 DON'T FORGET TO TAKE THE DEMO CONTEXT OUT OF YOUR DEFAULT CONTEXT.  There
73 isn't really a security reason, it just will keep people from wanting to 
74 play with your Asterisk setup remotely.
76 * LOG SECURITY
78 Please note that the Asterisk log files, as well as information printed to the
79 Asterisk CLI, may contain sensitive information such as passwords and call 
80 history.  Keep this in mind when providing access to these resources.