From f755276746daff23fd892c47d4bc4d08f3c0eeee Mon Sep 17 00:00:00 2001 From: bakape Date: Sat, 10 Oct 2015 19:55:44 +0300 Subject: [PATCH] Persist iptables after reboot --- scripts/deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 581b6d726..efb47849c 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash # Automatic deploymnent script for a fresh Ubuntu trusty (and possibly up) VPS +export DEBIAN_FRONTEND=noninteractive; apt-get update < /dev/null apt-get install -y build-essential git redis-server imagemagick\ - software-properties-common pngquant < /dev/null + iptables-persistent software-properties-common pngquant < /dev/null # ffmpeg PPA add-apt-repository ppa:mc3man/trusty-media -y # Node.js setup script @@ -12,7 +13,8 @@ apt-get dist-upgrade -y < /dev/null apt-get install ffmpeg nodejs -y < /dev/null # Port redirection -iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000 +iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000; +iptables-save > /etc/iptables/rules.v4 useradd -d /home/meguca -s /bin/bash -m -U meguca # Download and build meguca