From 0f6f5a3d6077870496a122b2fc6c45a2eb9e4cdd Mon Sep 17 00:00:00 2001 From: Dimitris Rozakis Date: Fri, 29 Jul 2016 15:44:42 +0300 Subject: [PATCH] Fix IN_IFACE in install.sh and vagrant --- Vagrantfile | 1 + scripts/install.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index a32e424..e7844a0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -75,6 +75,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| server.vm.provision "shell", inline: "WEB_SOCKET=192.168.69.100:8080 " \ "VPN_IP=192.168.75.100 " \ + "IN_IFACE=eth1 " \ "SOURCE_CIDRS=192.168.69.0/24 /vagrant/scripts/install.sh" server.vm.provision "shell", run: "always", diff --git a/scripts/install.sh b/scripts/install.sh index 33b70c5..8b5759a 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -20,6 +20,12 @@ if [ -z "$SOURCE_CIDRS" ]; then echo fi +if [ -z "$IN_IFACE" ]; then + echo "Please enter the lan interface of the server:" + read IN_IFACE + echo +fi + echo "Installing vpn-proxy from $DIR." echo "Webserver will be listening to $WEB_SOCKET." echo "VPN server will be listening to $VPN_IP." @@ -37,6 +43,7 @@ pip install -U django netaddr ipython echo "VPN_SERVER_REMOTE_ADDRESS = \"$VPN_IP\"" > $DIR/vpn-proxy/conf.d/0000-vpn-ip.py echo "SOURCE_CIDRS = \"$SOURCE_CIDRS\"" | tr -s ' ' > $DIR/vpn-proxy/conf.d/0001-src-cidrs.py +echo "IN_IFACE = \"$IN_IFACE\"" > $DIR/vpn-proxy/conf.d/0002-lan-iface.py $DIR/vpn-proxy/manage.py migrate $DIR/vpn-proxy/manage.py autosuperuser