diff --git a/plugins/l2tp/index.html b/plugins/l2tp/index.html
index 8176b605c..13b95bfaf 100755
--- a/plugins/l2tp/index.html
+++ b/plugins/l2tp/index.html
@@ -3,6 +3,7 @@
diff --git a/plugins/l2tp/index.py b/plugins/l2tp/index.py
index 462d2ea59..92552823d 100755
--- a/plugins/l2tp/index.py
+++ b/plugins/l2tp/index.py
@@ -92,6 +92,12 @@ def getPathFile():
return '/etc/ppp/chap-secrets'
+def getPathFilePsk():
+ if public.isAppleSystem():
+ return getServerDir() + '/ipsec.secrets'
+ return '/etc/ipsec.secrets'
+
+
def getUserList():
import re
path = getPathFile()
@@ -183,6 +189,8 @@ if __name__ == "__main__":
print reload()
elif func == 'conf':
print getPathFile()
+ elif func == 'conf_psk':
+ print getPathFilePsk()
elif func == 'user_list':
print getUserList()
elif func == 'add_user':
diff --git a/plugins/l2tp/tmp/ipsec.secrets b/plugins/l2tp/tmp/ipsec.secrets
new file mode 100644
index 000000000..e186ee087
--- /dev/null
+++ b/plugins/l2tp/tmp/ipsec.secrets
@@ -0,0 +1 @@
+%any %any : PSK "midoks"