From: madavi Date: Wed, 20 Nov 2019 05:28:15 +0000 (+0100) Subject: Merge "Install iptables-persistent package" X-Git-Tag: v7.0.0rc1~35 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=3f7f46ab7bf67ceb7d3c9a7f2c2aef5c2dea409d;hp=bf573187ee41e6a6fa1a9efccd3e1111c15419f7;p=osm%2Fdevops.git Merge "Install iptables-persistent package" --- diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 48f2cae4..d6a02862 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -646,6 +646,10 @@ function juju_createcontroller() { } function juju_createproxy() { + echo -e "\nChecking required packages: iptables-persistent" + dpkg -l iptables-persistent &>/dev/null || ! echo -e " Not installed.\nInstalling iptables-persistent requires root privileges" || \ + sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install iptables-persistent + if ! sudo iptables -t nat -C PREROUTING -p tcp -m tcp --dport 17070 -j DNAT --to-destination $OSM_VCA_HOST; then sudo iptables -t nat -A PREROUTING -p tcp -m tcp --dport 17070 -j DNAT --to-destination $OSM_VCA_HOST sudo netfilter-persistent save