Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Meißner
Scripts
Commits
4b8f774e
Commit
4b8f774e
authored
Jul 22, 2024
by
Florian Meissner
Browse files
Options
Downloads
Patches
Plain Diff
fix(vpn_uni): Use Zapf script
parent
48a1df05
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
vpn_uni.sh
+19
-35
19 additions, 35 deletions
vpn_uni.sh
with
19 additions
and
35 deletions
vpn_uni.sh
+
19
−
35
View file @
4b8f774e
#!/bin/bash
#!/bin/bash
VPN_USER
=
meissnerfl73755
MTU
=
1284
VPN_PASSWORD_FILE
=
$(
dirname
$0
)
/pws/vpn_uni
VPNUSER
=
meissnerfl73755
#VPN_PASSWORD_FILE=/home/ra1n/scripts/pws/vpn_uni
VPNPASSWORD
=
$(
cat
pws/vpn_uni
)
VPN_SERVER
=
vpn2.ohmportal.de
HIREPORT
=
/usr/libexec/openconnect/hipreport.sh
DEADPEERSSECS
=
30
_uid
=
1000
IFACE
=
vpn0
echo
$(
dirname
$0
)
set
+o histexpand
args
=(
# set protocol to globalprotect - probably don't change this
echo
$VPNPASSWORD
|
sudo
/usr/sbin/openconnect
\
--protocol
=
gp
--protocol
gp
\
--syslog
\
# drop privs after connect
--disable-ipv6
\
--setuid
=
$_uid
--csd-wrapper
$HIREPORT
\
# drop privs during vpn script
--interface
$IFACE
\
--csd-user
=
$_uid
--mtu
$MTU
\
--force-dpd
$DEADPEERSSECS
\
# vpn user name
--user
$VPNUSER
\
-u
$VPN_USER
--passwd-on-stdin
\
# does what it says
vpn.ohmportal.de
# --passwd-on-stdin
# override routing for common servers
# but servers are not used anymore
# and anyway this setting has never worked
# --resolve fsin.th-nuernberg.de:141.75.149.145
# --resolve fstest.th-nuernberg.de:141.75.149.143
# --servercert 'pin-sha256:lm+C0Qgm7ZTPMLZ7KJlRLk5teQGc9qhmGfZavlRv3eQ='
--disable-ipv6
)
#openconnect "${args[@]}" $VPN_SERVER
cat
$VPN_PASSWORD_FILE
| openconnect
"
${
args
[@]
}
"
$VPN_SERVER
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