X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=genesis.git;a=blobdiff_plain;f=foreman%2Fci%2Fnat_setup.sh;fp=foreman%2Fci%2Fnat_setup.sh;h=0000000000000000000000000000000000000000;hp=349e416d609275b2487dd2475ba8bba0f3c6e64e;hb=6f816a8546224dcce14fd6dddeb0c9252f69a1c7;hpb=d4eb37b317137772d783a12be0ff06504669ad63 diff --git a/foreman/ci/nat_setup.sh b/foreman/ci/nat_setup.sh deleted file mode 100755 index 349e416..0000000 --- a/foreman/ci/nat_setup.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -#NAT setup script to setup NAT from Admin -> Public interface -#on a Vagrant VM -#Called by Vagrantfile in conjunction with deploy.sh -#author: Tim Rozet (trozet@redhat.com) -# -#Uses Vagrant and VirtualBox -#VagrantFile uses nat_setup.sh which sets up NAT -# - -##make sure firewalld is stopped and disabled -if ! systemctl stop firewalld; then - printf '%s\n' 'nat_setup.sh: Unable to stop firewalld' >&2 - exit 1 -fi - -systemctl disable firewalld - -# Install iptables -# Major version is pinned to force some consistency for Arno -if ! yum -y install iptables-services-1*; then - printf '%s\n' 'nat_setup.sh: Unable to install iptables-services' >&2 - exit 1 -fi - -##start and enable iptables service -if ! systemctl start iptables; then - printf '%s\n' 'nat_setup.sh: Unable to start iptables-services' >&2 - exit 1 -fi - -systemctl enable iptables - -##enable IP forwarding -echo 1 > /proc/sys/net/ipv4/ip_forward - -##Configure iptables -/sbin/iptables -t nat -I POSTROUTING -o enp0s10 -j MASQUERADE -/sbin/iptables -I FORWARD 1 -i enp0s10 -o enp0s8 -m state --state RELATED,ESTABLISHED -j ACCEPT -/sbin/iptables -I FORWARD 1 -i enp0s8 -o enp0s10 -j ACCEPT -/sbin/iptables -I INPUT 1 -j ACCEPT -/sbin/iptables -I OUTPUT 1 -j ACCEPT -