Enable CiaB to send packets outside by using router and SNAT

Change-Id: I6afe069d0f1637c4c2a969887c624d7480c45135
diff --git a/comac-in-a-box/Makefile b/comac-in-a-box/Makefile
index c367432..6b5cc44 100644
--- a/comac-in-a-box/Makefile
+++ b/comac-in-a-box/Makefile
@@ -198,7 +198,14 @@
 	"until timeout 3 ping -I oip1 13.1.1.254 -c 1 > /dev/null 2>&1; do \
 		echo 'Waiting for DP to be ready'; \
 	done"
+	@echo "Test1: ping from UE to SGI network gateway"
 	ping -I oip1 13.1.1.254 -c 3
+	@echo "Test2: ping from UE to 8.8.8.8"
+	ping -I oip1 8.8.8.8 -c 3
+	@echo "Test3: ping from UE to opennetworking.org and google.com"
+	ping -I oip1 opennetworking.org -c 3
+	ping -I oip1 google.com -c 3
+	@echo "Finished to test"
 
 reset-test:
 	helm delete --purge oaisim || true
diff --git a/comac-in-a-box/resources/router.yaml b/comac-in-a-box/resources/router.yaml
index 2307a48..5f27992 100644
--- a/comac-in-a-box/resources/router.yaml
+++ b/comac-in-a-box/resources/router.yaml
@@ -41,9 +41,12 @@
     command: ["/bin/bash", "-c"]
     args:
       - >
+        sysctl -w net.ipv4.ip_forward=1;
+        iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
         trap : TERM INT; sleep infinity & wait
     image: opencord/quagga
     securityContext:
+      privileged: true
       capabilities:
         add:
           - NET_ADMIN