Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Computer Resources
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMGW
Computer Resources
Commits
5ae7c073
Commit
5ae7c073
authored
3 years ago
by
Michael Blaschek
Browse files
Options
Downloads
Patches
Plain Diff
vpn update
parent
cf46944f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SSH-VPN-VNC/connect2jet
+3
-1
3 additions, 1 deletion
SSH-VPN-VNC/connect2jet
SSH-VPN-VNC/connect2vpn
+33
-20
33 additions, 20 deletions
SSH-VPN-VNC/connect2vpn
with
36 additions
and
21 deletions
SSH-VPN-VNC/connect2jet
+
3
−
1
View file @
5ae7c073
...
...
@@ -22,6 +22,7 @@ Example:
EOF
}
debug
=
''
while
getopts
"g:p:r:hd"
flag
;
do
case
"
${
flag
}
"
in
...
...
@@ -58,7 +59,8 @@ if [ -n "${port}" ]; then
fi
fi
# Override Term information to make sure we use the ones on the servers
# export TERM=xterm-256color
# Check if names are in .ssh/config
remote_status
=
false
gateway_status
=
false
...
...
This diff is collapsed.
Click to expand it.
SSH-VPN-VNC/connect2vpn
+
33
−
20
View file @
5ae7c073
...
...
@@ -8,15 +8,34 @@
# Connect to VPN from the University of Vienna
# Watch connection
if
[
!
-n
${
VPN_USER
}
]
;
then
echo
"set VPN_USER to your u:account username"
exit
1
vpninfos
()
{
infos
=
$(
f5fpc
--info
)
status
=
$(
echo
"
${
infos
}
"
|
grep
'/Common/Remote-Access'
|
head
-n1
|
cut
-d
' '
-f3
)
cat
<<
EOF
[VPN]
${
status
}
[VPN] Connection Information. Use Ctrl+c to end.
===============================================================================
${
infos
}
EOF
}
if
[
$#
-eq
0
]
;
then
if
[
"
${
VPN_USER
}
"
!=
""
]
;
then
echo
"[VPN] using '
$VPN_USER
'"
else
read
-p
"[VPN] u:account username: "
VPN_USER
fi
else
VPN_USER
=
$1
echo
"[VPN] Using
${
VPN_USER
}
as username"
fi
f5fpc
-v
2> /dev/null 1>/dev/null
if
[
$?
-ne
0
]
;
then
echo
"[VPN] Install Big-IP Edge Client. f5fpc missing"
exit
1
else
echo
"[VPN]
$(
f5fpc
-v
|
head
-n1
)
"
fi
read
-p
"[VPN] Full (1) or split (None) tunnel? (1/None): "
REPLY
...
...
@@ -27,31 +46,25 @@ else
echo
"[VPN] Connecting full-tunnel ..."
cmd
=
"f5fpc -s -t vpn.univie.ac.at:8443 -u
${
VPN_USER
}
"
fi
# Todo: Does not work? f5fpc is too slow
# Can happen that there is no return
# as of bad shutdown or so
# echo "[VPN] Checking for existing connections..."
# output=$(netstat | grep vpn.univie.ac.at | wc -l)
# if [ $output - 2 ]; then
# echo "[VPN] Found a running instance:"
# f5fpc --info
# read -p "[VPN] shutdown (1) or keep (none) ? " REPLY
# if [ "$REPLY" == "1" ]; then
# f5fpc -o
# echo "[VPN] disconnected"
# else
# exit
# fi
# fi
echo
"[VPN] Starting Monitor..."
# Show status
export
-f
vpninfos
init
=
true
while
true
;
do
f5fpc
--info
|
grep
"established"
>
/dev/null
if
[
$?
-ne
0
]
;
then
if
!
$init
;
then
echo
"[VPN] Restarting ..."
f5fpc
-o
fi
echo
"[VPN] Starting connection ..."
eval
$cmd
if
$init
;
then
init
=
false
fi
fi
watch
-n
2
'f5fpc --
info
'
watch
-n
2
vpn
info
s
read
-p
"[VPN] Reconnect (1) or shutdown (None): "
REPLY
if
[
"
$REPLY
"
==
""
]
;
then
break
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment