Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. node default {
  2.  
  3. #
  4. # Firewall
  5. #
  6.  
  7. class { 'firewall': }
  8. resources { "firewall": }
  9.  
  10. firewallchain { 'INPUT:filter:IPv4':
  11. purge => true,
  12. }
  13. firewallchain { 'FORWARD:filter:IPv4':
  14. purge => true,
  15. }
  16.  
  17. firewall { '001 INPUT accept all on lo':
  18. proto => "all",
  19. action => 'accept',
  20. chain => "INPUT",
  21. iniface => 'lo',
  22. }
  23.  
  24. firewall { '200 allow ssh from outside':
  25. iniface => "eth0",
  26. proto => "tcp",
  27. dport => "22",
  28. action => 'accept',
  29. chain => "INPUT",
  30. }
  31. firewall { '201 allow http from outside':
  32. iniface => "eth0",
  33. proto => "tcp",
  34. dport => [80, 81],
  35. action => 'accept',
  36. chain => "INPUT",
  37. }
  38.  
  39. #firewall { '202 allow http81 from outside':
  40. # iniface => "eth0",
  41. # proto => "tcp",
  42. # dport => "81",
  43. # action => 'accept',
  44. # chain => "INPUT",
  45. #}
  46.  
  47. firewall { '299 default deny from outside':
  48. iniface => "eth1",
  49. proto => "all",
  50. action => 'drop',
  51. chain => "INPUT",
  52. }
  53.  
  54. #
  55. # ntp
  56. #
  57. include ntp
  58. class { 'ntp':
  59. servers => [ '0.ch.pool.ntp.org', '1.ch.pool.ntp.org', '2.ch.pool.ntp.org', '3.ch.pool.ntp.org' ],
  60. }
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement