Basic_Setup.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. Autogenerated on 2012-11-29
  2. from - https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Basic_Setup
  3. Basic Setup
  4. When using Debian or FreeBSD, make sure you enter all commands as root/super-
  5. user because for these operating systems it is not possible to use 'sudo'.
  6. Start with creating a directory for Suricata's log information.
  7. sudo mkdir /var/log/suricata
  8. To prepare the system for using it, enter:
  9. sudo mkdir /etc/suricata
  10. The next step is to copy classification.config, reference.config and
  11. suricata.yaml from the base build/installation directory (ex. from git it will
  12. be the oisf directory) to the /etc/suricata directory. Do so by entering the
  13. following:
  14. sudo cp classification.config /etc/suricata
  15. sudo cp reference.config /etc/suricata
  16. sudo cp suricata.yaml /etc/suricata
  17. Auto setup
  18. You can also use the available auto setup features of Suricata:
  19. ex:
  20. ./configure && make && make install-conf
  21. make install-conf
  22. would do the regular "make install" and then it would automatically create/
  23. setup all the necessary directories and suricata.yaml for you.
  24. ./configure && make && make install-rules
  25. make install-rules
  26. would do the regular "make install" and then it would automatically download
  27. and set up the latest ruleset from Emerging Threats available for Suricata
  28. ./configure && make && make install-full
  29. make install-full
  30. would combine everything mentioned above (install-conf and install-rules) - and
  31. will present you with a ready to run (configured and set up) Suricata
  32. Setting variables
  33. Make sure every variable of the vars, address-groups and port-groups in the
  34. yaml file is set correctly for your needs. A full explanation is available in
  35. the Rule_vars_section_of_the_yaml. You need to set the ip-address(es) of your
  36. local network at HOME_NET. It is recommended to set EXTERNAL_NET to !$HOME_NET.
  37. This way, every ip-address but the one set at HOME_NET will be treated as
  38. external. It is also possible to set EXTERNAL_NET to 'any', only the
  39. recommended setting is more precise and lowers the change that false positives
  40. will be generated. HTTP_SERVERS, SMTP_SERVERS , SQL_SERVERS , DNS_SERVERS and
  41. TELNET_SERVERS are by default set to HOME_NET. AIM_SERVERS is by default set at
  42. 'any'. These variables have to be set for servers on your network. All settings
  43. have to be set to let it have a more accurate effect.
  44. Next, make sure the following ports are set to your needs: HTTP_PORTS,
  45. SHELLCODE_PORTS, ORACLE_PORTS and SSH_PORTS.
  46. Finally, set the host-os-policy to your needs. See Host_OS_Policy_in_the_yaml
  47. for a full explanation.
  48. windows:[]
  49. bsd: []
  50. bsd-right: []
  51. old-linux: []
  52. linux: [10.0.0.0/8, 192.168.1.100, "8762:2352:6241:7245:E000:0000:0000:
  53. 0000"]
  54. old-solaris: []
  55. solaris: ["::1"]
  56. hpux10: []
  57. hpux11: []
  58. irix: []
  59. macos: []
  60. vista: []
  61. windows2k3: []
  62. Note that bug #499 may prevent you from setting old-linux, bsd-right and old-
  63. solaris right now.
  64. Interface cards
  65. To check the available interface cards, enter:
  66. ifconfig
  67. Now you can see which one you would like Suricata to use.
  68. To start the engine and include the interface card of your preference, enter:
  69. sudo suricata -c /etc/suricata/suricata.yaml -i wlan0
  70. Instead of wlan0, you can enter the interface card of your preference.
  71. To see if the engine is working correctly and receives and inspects traffic,
  72. enter:
  73. cd /var/log/suricata
  74. Followed by:
  75. tail http.log
  76. And:
  77. tail -n 50 stats.log
  78. To make sure the information displayed is up-dated in real time, use the -
  79. f option before http.log and stats.log:
  80. tail -f http.log stats.log