SECURITY 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ==== Security Notes with Asterisk ====
  2. PLEASE READ THE FOLLOWING IMPORTANT SECURITY RELATED INFORMATION.
  3. IMPROPER CONFIGURATION OF ASTERISK COULD ALLOW UNAUTHORIZED USE OF YOUR
  4. FACILITIES, POTENTIALLY INCURRING SUBSTANTIAL CHARGES.
  5. Asterisk security involves both network security (encryption, authentication)
  6. as well as dialplan security (authorization - who can access services in
  7. your pbx). If you are setting up Asterisk in production use, please make
  8. sure you understand the issues involved.
  9. * NETWORK SECURITY
  10. If you install Asterisk and use the "make samples" command to install
  11. a demonstration configuration, Asterisk will open a few ports for accepting
  12. VoIP calls. Check the channel configuration files for the ports and IP addresses.
  13. If you enable the manager interface in manager.conf, please make sure that
  14. you access manager in a safe environment or protect it with SSH or other
  15. VPN solutions.
  16. For all TCP/IP connections in Asterisk, you can set ACL lists that
  17. will permit or deny network access to Asterisk services. Please check
  18. the "permit" and "deny" configuration options in manager.conf and
  19. the VoIP channel configurations - i.e. sip.conf and iax.conf.
  20. The IAX2 protocol supports strong RSA key authentication as well as
  21. AES encryption of voice and signalling. The SIP channel does not
  22. support encryption in this version of Asterisk.
  23. * DIALPLAN SECURITY
  24. First and foremost remember this:
  25. USE THE EXTENSION CONTEXTS TO ISOLATE OUTGOING OR TOLL SERVICES FROM ANY
  26. INCOMING CONNECTIONS.
  27. You should consider that if any channel, incoming line, etc can enter an
  28. extension context that it has the capability of accessing any extension
  29. within that context.
  30. Therefore, you should NOT allow access to outgoing or toll services in
  31. contexts that are accessible (especially without a password) from incoming
  32. channels, be they IAX channels, FX or other trunks, or even untrusted
  33. stations within you network. In particular, never ever put outgoing toll
  34. services in the "default" context. To make things easier, you can include
  35. the "default" context within other private contexts by using:
  36. include => default
  37. in the appropriate section. A well designed PBX might look like this:
  38. [longdistance]
  39. exten => _91NXXNXXXXXX,1,Dial(Zap/g2/${EXTEN:1})
  40. include => local
  41. [local]
  42. exten => _9NXXNXXX,1,Dial(Zap/g2/${EXTEN:1})
  43. include => default
  44. [default]
  45. exten => 6123,Dial(Zap/1)
  46. DON'T FORGET TO TAKE THE DEMO CONTEXT OUT OF YOUR DEFAULT CONTEXT. There
  47. isn't really a security reason, it just will keep people from wanting to
  48. play with your Asterisk setup remotely.