diff --git a/basice2e/betanet.txt b/basice2e/betanet.txt
new file mode 100644
index 0000000000000000000000000000000000000000..afd0c4cb096483247a54d87452b2cfde7e0671b1
--- /dev/null
+++ b/basice2e/betanet.txt
@@ -0,0 +1,5 @@
+109.169.15.30:22840
+5.12.137.118:22840
+92.246.20.92:22840
+178.16.39.203:22840
+86.135.17.18:22840
diff --git a/basice2e/network.config b/basice2e/network.config
new file mode 100644
index 0000000000000000000000000000000000000000..42a45df01b50888775a3bdf57a26a72aef5230cc
--- /dev/null
+++ b/basice2e/network.config
@@ -0,0 +1,18 @@
+localhost:8440
+# This is the network configuration file. The top line of this file,
+# when not set via command line, is used to determine to which network
+# the integration test will be run against.
+
+# Note you can also specify "release" and "betanet" on run.sh
+
+# Betanet gateways
+109.169.15.30:22840
+5.12.137.118:22840
+92.246.20.92:22840
+178.16.39.203:22840
+86.135.17.18:22840
+
+# Release (messenger test) network gateways
+34.221.74.216:11420
+52.25.9.28:11420
+54.149.122.115:11420
diff --git a/basice2e/release.txt b/basice2e/release.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f0b068d95abde5d34814dc1ba3d5a9d29f7b1012
--- /dev/null
+++ b/basice2e/release.txt
@@ -0,0 +1,3 @@
+34.221.74.216:11420
+52.25.9.28:11420
+54.149.122.115:11420
diff --git a/basice2e/run.sh b/basice2e/run.sh
index 7c251553044dbed59ddf7bb769333b674308e75d..8051ef99b4b517511b330ee59a3b68f3695b17f0 100755
--- a/basice2e/run.sh
+++ b/basice2e/run.sh
@@ -15,12 +15,12 @@ mkdir -p .elixxir
 
 if [ $# -gt 1 ]
 then
-    echo "usage: $0 [permsip:port]"
+    echo "usage: $0 [gatewayip:port]"
     exit
 fi
 
 
-PERMISSIONING=$1
+NETWORKENTRYPOINT=$1
 
 DEBUGLEVEL=${DEBUGLEVEL-0}
 
@@ -44,7 +44,20 @@ mkdir -p $GATEWAYLOGS
 mkdir -p $CLIENTOUT
 mkdir -p $CLIENTCLEAN
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "betanet" ]
+then
+    NETWORKENTRYPOINT=$(sort -R betanet.txt | head -1)
+elif [ "$NETWORKENTRYPOINT" == "release" ]
+then
+    NETWORKENTRYPOINT=$(sort -R release.txt | head -1)
+elif [ "$NETWORKENTRYPOINT" == "" ]
+then
+    NETWORKENTRYPOINT=$(head -1 network.config)
+fi
+
+echo "NETWORK: $NETWORKENTRYPOINT"
+
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
     echo "STARTING SERVERS..."
 
@@ -138,19 +151,19 @@ then
         echo -n "."
     done
 
-    echo "localhost:18000" > results/permserver.txt
+    echo "localhost:8440" > results/startgwserver.txt
 
     echo "DONE LETS DO STUFF"
 
 else
-    echo "Connecting to network defined at $PERMISSIONING"
-    echo $PERMISSIONING > results/permserver.txt
+    echo "Connecting to network defined at $NETWORKENTRYPOINT"
+    echo $NETWORKENTRYPOINT > results/startgwserver.txt
 fi
 
 echo "DOWNLOADING TLS Cert..."
-openssl s_client -showcerts -connect $(cat results/permserver.txt) < /dev/null 2>&1 | openssl x509 -outform PEM > results/permcert.pem
+openssl s_client -showcerts -connect $(cat results/startgwserver.txt) < /dev/null 2>&1 | openssl x509 -outform PEM > results/startgwcert.pem
 echo "DOWNLOADING NDF..."
-CLIENTCMD="../bin/client getndf --permhost $(cat results/permserver.txt) --cert results/permcert.pem"
+CLIENTCMD="../bin/client getndf --gwhost $(cat results/startgwserver.txt) --cert results/startgwcert.pem"
 eval $CLIENTCMD >> results/ndf.json 2>&1 &
 PIDVAL=$!
 echo "$CLIENTCMD -- $PIDVAL"
@@ -204,7 +217,7 @@ runclients() {
 }
 
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
 
     echo "RUNNING BASIC CLIENTS..."
@@ -458,7 +471,7 @@ wait $PIDVAL1
 wait $PIDVAL2
 
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
     # UD Test
     echo "TESTING USER DISCOVERY..."
@@ -736,7 +749,7 @@ else
     [ -s results/deleteContact.txt ]
 fi
 
-if [ "$PERMISSIONING" == "" ]
+if [ "$NETWORKENTRYPOINT" == "localhost:8440" ]
 then
 
     #cat $CLIENTOUT/* | strings | grep -e "ERROR" -e "FATAL" > results/client-errors || true