Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
csback
Commits
47aaf0a0
Commit
47aaf0a0
authored
Sep 02, 2016
by
thomas.forbriger
Browse files
BFO2LSDF [FEATURE]: use openvpn instead of vpnc
parent
7b128e40
Changes
1
Hide whitespace changes
Inline
Side-by-side
BFO2LSDF.sh
View file @
47aaf0a0
...
...
@@ -36,7 +36,8 @@
# ============================================================================
#
TUN_INTERFACE
=
tun0
# VPN tunnel interface
TUN_INTERFACE
=
tap0
# approx. 80% of 256 kBit/second
BWLIMIT
=
20
EXCLUDE
=
"--exclude='.lock'"
...
...
@@ -97,18 +98,26 @@ do
${
LOGGER
}
-i
-p
user.info
"
${
LOGINFO
}
VPN connection already had been
\
established using IP
${
tunIPs
}
."
else
# start
juniper network client
${
JNC
}
--nox
kit
>
/dev/null 2>&1
# start
openvpn (requires appropriate system configuration)
sudo
/usr/sbin/openvpn /etc/openvpn/scc.ovpn.bromo
>
/dev/null 2>&1
if
[
$?
-ne
0
]
then
${
LOGGER
}
-i
-p
user.err
"
${
LOGERROR
}
Could not establish VPN
\
connection."
exit
2
else
tunIPs
=
$(
${
IP
}
addr show
${
TUN_INTERFACE
}
|
${
GREP
}
-e
"inet"
|
\
awk
'{print $2}'
)
${
LOGGER
}
-i
-p
user.info
"
${
LOGINFO
}
VPN connection successfully
\
established using IP
${
tunIPs
}
."
${
IP
}
addr show
${
TUN_INTERFACE
}
>
/dev/null 2>&1
if
[
$?
-eq
0
]
then
tunIPs
=
$(
${
IP
}
addr show
${
TUN_INTERFACE
}
|
${
GREP
}
-e
"inet"
|
\
awk
'{print $2}'
)
${
LOGGER
}
-i
-p
user.info
"
${
LOGINFO
}
VPN connection already had been
\
established using IP
${
tunIPs
}
."
else
${
LOGGER
}
-i
-p
user.err
"
${
LOGERROR
}
Could not establish VPN
\
connection."
exit
2
fi
fi
fi
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment