add a project-specific script to be used during release preparation
[asterisk-bristuff.git] / doc / security.txt
blob3290cba487ae8e64b6ac11cb8551895bc60875d5
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 * DIALPLAN SECURITY
33 First and foremost remember this:
35 USE THE EXTENSION CONTEXTS TO ISOLATE OUTGOING OR TOLL SERVICES FROM ANY
36 INCOMING CONNECTIONS.
38 You should consider that if any channel, incoming line, etc can enter an
39 extension context that it has the capability of accessing any extension
40 within that context. 
42 Therefore, you should NOT allow access to outgoing or toll services in
43 contexts that are accessible (especially without a password) from incoming
44 channels, be they IAX channels, FX or other trunks, or even untrusted
45 stations within you network.  In particular, never ever put outgoing toll
46 services in the "default" context.  To make things easier, you can include
47 the "default" context within other private contexts by using:
49         include => default
51 in the appropriate section.  A well designed PBX might look like this:
53 [longdistance]
54 exten => _91NXXNXXXXXX,1,Dial(Zap/g2/${EXTEN:1})
55 include => local
57 [local]
58 exten => _9NXXNXXX,1,Dial(Zap/g2/${EXTEN:1})
59 include => default
61 [default]
62 exten => 6123,Dial(Zap/1)
65 DON'T FORGET TO TAKE THE DEMO CONTEXT OUT OF YOUR DEFAULT CONTEXT.  There
66 isn't really a security reason, it just will keep people from wanting to 
67 play with your Asterisk setup remotely.