summaryrefslogtreecommitdiff
path: root/spec/site_to_site_vpn
diff options
context:
space:
mode:
authorYuya Kusakabe <yuya.kusakabe@gmail.com>2017-07-22 22:31:25 +0900
committerYuya Kusakabe <yuya.kusakabe@gmail.com>2017-07-22 22:31:25 +0900
commitef1952b6d89f2326c56932bfc07e19ff7f713a01 (patch)
tree127561d1a75566c99855a6daf2faea8f55a8cfb0 /spec/site_to_site_vpn
parent2462c51c199bef49b6e3673dfd5d6168983340b9 (diff)
downloadvyos-integration-test-ef1952b6d89f2326c56932bfc07e19ff7f713a01.tar.gz
vyos-integration-test-ef1952b6d89f2326c56932bfc07e19ff7f713a01.zip
Run script with vyattacfg group
Diffstat (limited to 'spec/site_to_site_vpn')
-rw-r--r--spec/site_to_site_vpn/config.yaml12
-rw-r--r--spec/site_to_site_vpn/vyos1_script.sh4
-rw-r--r--spec/site_to_site_vpn/vyos2_script.sh4
-rw-r--r--spec/site_to_site_vpn/vyos3_script.sh4
-rw-r--r--spec/site_to_site_vpn/vyos4_script.sh4
5 files changed, 22 insertions, 6 deletions
diff --git a/spec/site_to_site_vpn/config.yaml b/spec/site_to_site_vpn/config.yaml
index 01178dc..35406da 100644
--- a/spec/site_to_site_vpn/config.yaml
+++ b/spec/site_to_site_vpn/config.yaml
@@ -1,15 +1,15 @@
---
vyos1:
:networks:
- net1: "10.0.1.11"
- net2: "10.0.2.11"
+ net1: "10.0.1.11/24"
+ net2: "10.0.2.11/24"
vyos2:
:networks:
- net1: "10.0.1.12"
- net3: "10.0.3.11"
+ net1: "10.0.1.12/24"
+ net3: "10.0.3.11/24"
vyos3:
:networks:
- net2: "10.0.2.13"
+ net2: "10.0.2.13/24"
vyos4:
:networks:
- net3: "10.0.3.14"
+ net3: "10.0.3.14/24"
diff --git a/spec/site_to_site_vpn/vyos1_script.sh b/spec/site_to_site_vpn/vyos1_script.sh
index 8033692..32a2395 100644
--- a/spec/site_to_site_vpn/vyos1_script.sh
+++ b/spec/site_to_site_vpn/vyos1_script.sh
@@ -1,5 +1,9 @@
#!/bin/vbash
+if [ "$(id -g -n)" != 'vyattacfg' ] ; then
+ exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
+fi
+
source /opt/vyatta/etc/functions/script-template
set vpn ipsec ike-group ike-g proposal 1 encryption aes256
diff --git a/spec/site_to_site_vpn/vyos2_script.sh b/spec/site_to_site_vpn/vyos2_script.sh
index 2e01140..61bd0df 100644
--- a/spec/site_to_site_vpn/vyos2_script.sh
+++ b/spec/site_to_site_vpn/vyos2_script.sh
@@ -1,5 +1,9 @@
#!/bin/vbash
+if [ "$(id -g -n)" != 'vyattacfg' ] ; then
+ exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
+fi
+
source /opt/vyatta/etc/functions/script-template
set vpn ipsec ike-group ike-g proposal 1 encryption aes256
diff --git a/spec/site_to_site_vpn/vyos3_script.sh b/spec/site_to_site_vpn/vyos3_script.sh
index e443225..3db2539 100644
--- a/spec/site_to_site_vpn/vyos3_script.sh
+++ b/spec/site_to_site_vpn/vyos3_script.sh
@@ -1,5 +1,9 @@
#!/bin/vbash
+if [ "$(id -g -n)" != 'vyattacfg' ] ; then
+ exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
+fi
+
source /opt/vyatta/etc/functions/script-template
set protocols static route 10.0.3.0/24 next-hop 10.0.2.11
diff --git a/spec/site_to_site_vpn/vyos4_script.sh b/spec/site_to_site_vpn/vyos4_script.sh
index ec45e72..df048bb 100644
--- a/spec/site_to_site_vpn/vyos4_script.sh
+++ b/spec/site_to_site_vpn/vyos4_script.sh
@@ -1,5 +1,9 @@
#!/bin/vbash
+if [ "$(id -g -n)" != 'vyattacfg' ] ; then
+ exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
+fi
+
source /opt/vyatta/etc/functions/script-template
set protocols static route 10.0.2.0/24 next-hop 10.0.3.11