Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for IPv6 #56

Merged
merged 2 commits into from
Sep 1, 2014
Merged

Support for IPv6 #56

merged 2 commits into from
Sep 1, 2014

Conversation

chantra
Copy link
Contributor

@chantra chantra commented Aug 30, 2014

Passing the test is pending on
mizzy/specinfra#210
mizzy/serverspec#469

-----> Starting Kitchen (v1.2.2.dev)
-----> Verifying ...
Removing /tmp/busser/suites/serverspec
Uploading /tmp/busser/suites/serverspec/list_of_tables_spec.rb
(mode=0644)
-----> Running serverspec test suite
/opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -S
/opt/chef/embedded/bin/rspec /tmp/busser/suites/
serverspec/list_of_tables_spec.rb --color --format documentation

   iptables
     should have rule "-A INPUT -j simple_rule"
     should have rule "-A simple_rule -p tcp -m tcp --dport 80 -j ACCEPT"
     should have rule "-A INPUT -p tcp -m tcp --dport 81 -j ACCEPT"
     should have rule "-A FORWARD -p tcp -m tcp --dport 82 -j ACCEPT"
     should have rule "-A INPUT -m state --state NEW -j jump_with_rule"
     should have rule "-A jump_with_rule -p tcp -m tcp --dport 83 -j ACCEPT"
     should have rule "-A array_of_rules -p tcp -m tcp --dport 84 -j ACCEPT"
     should have rule "-A array_of_rules -p tcp -m tcp --dport 85 -j ACCEPT"
     should have rule "-A INPUT -j array_of_rules"
     should not have rule "*nat"
     should have rule "*mangle"
     should have rule "*filter"
     should not have rule "*raw"

   ip6tables
     should have rule "-A INPUT -j simple_rule"
     should have rule "-A simple_rule -p tcp -m tcp --dport 80 -j ACCEPT"
     should have rule "-A INPUT -p tcp -m tcp --dport 81 -j ACCEPT"
     should not have rule "-A FORWARD -p tcp -m tcp --dport 82 -j ACCEPT"
     should not have rule "-A INPUT -m state --state NEW -j jump_with_rule"
     should not have rule "-A jump_with_rule -p tcp -m tcp --dport 83 -j ACCEPT"
     should have rule "-A array_of_rules -p tcp -m tcp --dport 84 -j ACCEPT"
     should have rule "-A array_of_rules -p tcp -m tcp --dport 85 -j ACCEPT"
     should have rule "-A INPUT -j array_of_rules"
     should not have rule "*nat"
     should have rule "*mangle"
     should have rule "*filter"
     should not have rule "*raw"

   Finished in 0.23916 seconds
   26 examples, 0 failures
   Finished verifying <ipv6-list-of-tables-centos-65> (0m1.63s).

-----> Kitchen is finished. (0m2.37s)

-----> Starting Kitchen (v1.2.2.dev)
-----> Verifying <ipv6-list-of-tables-centos-65>...
       Removing /tmp/busser/suites/serverspec
       Uploading /tmp/busser/suites/serverspec/list_of_tables_spec.rb
(mode=0644)
-----> Running serverspec test suite
       /opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -S
/opt/chef/embedded/bin/rspec /tmp/busser/suites/
serverspec/list_of_tables_spec.rb --color --format documentation

       iptables
         should have rule "-A INPUT -j simple_rule"
         should have rule "-A simple_rule -p tcp -m tcp --dport 80 -j ACCEPT"
         should have rule "-A INPUT -p tcp -m tcp --dport 81 -j ACCEPT"
         should have rule "-A FORWARD -p tcp -m tcp --dport 82 -j ACCEPT"
         should have rule "-A INPUT -m state --state NEW -j jump_with_rule"
         should have rule "-A jump_with_rule -p tcp -m tcp --dport 83 -j ACCEPT"
         should have rule "-A array_of_rules -p tcp -m tcp --dport 84 -j ACCEPT"
         should have rule "-A array_of_rules -p tcp -m tcp --dport 85 -j ACCEPT"
         should have rule "-A INPUT -j array_of_rules"
         should not have rule "*nat"
         should have rule "*mangle"
         should have rule "*filter"
         should not have rule "*raw"

       ip6tables
         should have rule "-A INPUT -j simple_rule"
         should have rule "-A simple_rule -p tcp -m tcp --dport 80 -j ACCEPT"
         should have rule "-A INPUT -p tcp -m tcp --dport 81 -j ACCEPT"
         should not have rule "-A FORWARD -p tcp -m tcp --dport 82 -j ACCEPT"
         should not have rule "-A INPUT -m state --state NEW -j jump_with_rule"
         should not have rule "-A jump_with_rule -p tcp -m tcp --dport 83 -j ACCEPT"
         should have rule "-A array_of_rules -p tcp -m tcp --dport 84 -j ACCEPT"
         should have rule "-A array_of_rules -p tcp -m tcp --dport 85 -j ACCEPT"
         should have rule "-A INPUT -j array_of_rules"
         should not have rule "*nat"
         should have rule "*mangle"
         should have rule "*filter"
         should not have rule "*raw"

       Finished in 0.23916 seconds
       26 examples, 0 failures
       Finished verifying <ipv6-list-of-tables-centos-65> (0m1.63s).
-----> Kitchen is finished. (0m2.37s)
@chantra
Copy link
Contributor Author

chantra commented Aug 31, 2014

specinfra and serverspec have merged the PR, tests are now passing out of the box when using kitchen test

@rtkrruvinskiy
Copy link
Contributor

Chantra, thanks a lot for your contribution! Looks really good, aside from the one comment that I made.

@chantra
Copy link
Contributor Author

chantra commented Sep 1, 2014

@rtkrruvinskiy I have just refactored the code in chantra/cookbook-simple-iptables@1a37646

rtkrruvinskiy added a commit that referenced this pull request Sep 1, 2014
@rtkrruvinskiy rtkrruvinskiy merged commit 0a068f6 into rtkwlf:master Sep 1, 2014
@chantra chantra deleted the ipv6 branch September 11, 2014 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants