Guest User

Untitled

a guest
Jul 15th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. define mysqld::firewall::instance (
  2. )
  3.  
  4. include iptables
  5.  
  6. # Set the defaults for each iptables::filter entry
  7. Iptables::Filter{
  8. dport => '3306',
  9. state => 'new',
  10. protocol => 'tcp'
  11. }
  12.  
  13. $name_lc = inline_template('<%= name.downcase -%>')
  14.  
  15. # create an iptables::filter entry for each source chain that requires access
  16. iptables::filter{ "1300-mysqld-$name_lc" : jump => $name }
  17.  
  18. }
  19.  
  20. Called like this:
  21.  
  22. $sources = ['FOO', 'BAR'], where FOO and BAR are pre-defined iptables "jumps"
  23. mysqld::firewall::instance { $sources: }
Add Comment
Please, Sign In to add comment