From a6ed9873f3000b0a73f586795fadf7381ae1ee9f Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 26 May 2016 11:33:41 +0100 Subject: [PATCH] Setup iptables-clear.sh Move this from the nova repo --- iptables-clear.sh | 26 ++++++++++++++++++++++++++ test-prepare-host.yml | 2 ++ 2 files changed, 28 insertions(+) create mode 100755 iptables-clear.sh diff --git a/iptables-clear.sh b/iptables-clear.sh new file mode 100755 index 00000000..eb782c52 --- /dev/null +++ b/iptables-clear.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Copyright 2015, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +iptables -F +iptables -X +iptables -t nat -F +iptables -t nat -X +iptables -t mangle -F +iptables -t mangle -X +iptables -P INPUT ACCEPT +iptables -P FORWARD ACCEPT +iptables -P OUTPUT ACCEPT diff --git a/test-prepare-host.yml b/test-prepare-host.yml index 6071b549..66d806e9 100644 --- a/test-prepare-host.yml +++ b/test-prepare-host.yml @@ -16,6 +16,8 @@ - name: Playbook for configuring the LXC host hosts: localhost pre_tasks: + - name: Clear iptables rules + shell: ./iptables-clear.sh - name: Update apt cache apt: update_cache: yes