<commit_before>= Moonshine_Iptables

== A plugin for Moonshine[http://github.com/railsmachine/moonshine]

=== Instructions

* <tt>script/plugin install git://github.com/railsmachine/moonshine_iptables.git</tt>
* Include the plugin and recipe in your Moonshine manifest.
    plugin :iptables
    recipe :iptables
* The default iptables rules:
  - Allow inbound ESTABLISHED and RELATED traffic
  - Allow inbound icmp, smtp, ssh, http, https
  - Allow inbound connections to unprivileged ports in the 8000-10000 range
  - Allow outbound connections to anywhere
* To use custom rules, pass the ruleset to the iptables recipe
  in an array. You need to pass the *entire* ruleset.
  
    recipe :iptables, { :rules => [
      '-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT',
      '-A INPUT -p icmp -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 53 -j ACCEPT',  # <-- Custom: Allowing DNS
      '-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT',
      '-A INPUT -s 127.0.0.1 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 8000:10000 -j ACCEPT',
      '-A INPUT -p udp -m udp --dport 8000:10000 -j ACCEPT'
    ]}<commit_msg>illustrate configuring rules via configure(). mo betta style.<commit_after>= Moonshine_Iptables

== A plugin for Moonshine[http://github.com/railsmachine/moonshine]

=== Instructions

* <tt>script/plugin install git://github.com/railsmachine/moonshine_iptables.git</tt>
* Include the plugin and recipe in your Moonshine manifest.
    plugin :iptables
    recipe :iptables
* The default iptables rules:
  - Allow inbound ESTABLISHED and RELATED traffic
  - Allow inbound icmp, smtp, ssh, http, https
  - Allow inbound connections to unprivileged ports in the 8000-10000 range
  - Allow outbound connections to anywhere
* For custom rules, use the <tt>configure</tt> method before calling the 
  <tt>iptables</tt> recipe. You will need to pass the *entire* ruleset.
  
    configure (:iptables => { :rules => [
      '-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT',
      '-A INPUT -p icmp -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 53 -j ACCEPT',  # <-- Custom: Allowing DNS
      '-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT',
      '-A INPUT -s 127.0.0.1 -j ACCEPT',
      '-A INPUT -p tcp -m tcp --dport 8000:10000 -j ACCEPT',
      '-A INPUT -p udp -m udp --dport 8000:10000 -j ACCEPT'
    ]}}
{'fraction_non_alphanumeric': 0.12208865514650638, 'fraction_numerical': 0.03305785123966942, 'mean_word_length': 2.642954856361149, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3038973', 'n_tokens_mistral': 998, 'n_tokens_neox': 937, 'n_words': 350}