Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
slapos.package
Commits
e7994556
Commit
e7994556
authored
Aug 31, 2012
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added OpenVPN to package and made necessary modifications
parent
cb73a56e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
5 deletions
+139
-5
slapos-node/Makefile
slapos-node/Makefile
+6
-0
slapos-node/slapos-start
slapos-node/slapos-start
+10
-4
slapos-node/template/openvpn/vifib-keys/ca.crt
slapos-node/template/openvpn/vifib-keys/ca.crt
+21
-0
slapos-node/template/openvpn/vifib-keys/client-vifib.crt
slapos-node/template/openvpn/vifib-keys/client-vifib.crt
+71
-0
slapos-node/template/openvpn/vifib-keys/client-vifib.key
slapos-node/template/openvpn/vifib-keys/client-vifib.key
+15
-0
slapos-node/template/openvpn/vifib.conf
slapos-node/template/openvpn/vifib.conf
+14
-0
slapos-node/template/slapos-node.cron.d
slapos-node/template/slapos-node.cron.d
+1
-0
slapprepare/slapprepare/script/slapos
slapprepare/slapprepare/script/slapos
+0
-1
templates/debian/cron.d
templates/debian/cron.d
+1
-0
No files found.
slapos-node/Makefile
View file @
e7994556
...
...
@@ -12,6 +12,12 @@ install: all
cp
slapos-start
$(DESTDIR)
/usr/sbin/
cp
slaptest
$(DESTDIR)
/usr/sbin/
cp
$(DESTDIR)
/opt/slapos/bin/slapos
$(DESTDIR)
/usr/sbin/
# Open VPN configuration
mkdir
-p
$(DESTDIR)
/etc/openvpn/
cp
-r
template/openvpn/
*
$(DESTDIR)
/etc/openvpn/
# Activate openvpn
mkdir
-p
$(DESTDIR)
/etc/opt/slapos/
touch
$(DESTDIR)
/etc/opt/slapos/openvpn-needed
clean
:
# cd slapos; make clean
...
...
slapos-node/slapos-start
View file @
e7994556
...
...
@@ -24,6 +24,12 @@ while [ $? != 0 ]; do
ping
-c
2
$IPV4CHECK
done
# Launch openvpn
if
[
-f
$SLAPOS_CONFIGURATION
/openvpn-needed
]
;
then
/etc/init.d/openvpn start
sleep
10
fi
# Wait for ipv6 connection to be ready
i
=
0
ping6
-c
2
$IPV6CHECK
...
...
@@ -41,9 +47,9 @@ done
i
=
1
echo
-n
"Running slapformat..."
/opt/slapos/bin/slapformat
--now
--console
--verbose
--log_file
=
/opt/slapos/slapformat.log
$SLAPOS_CONFIGURATION
/slapos.cfg
while
[
[
$?
!=
0
]
]
;
do
while
[
$?
!=
0
]
;
do
sleep
$((
$i
*
60
))
if
[
[
$i
< 20
]
]
;
then
if
[
$i
< 20
]
;
then
let
i++
fi
echo
"Retrying slapformat"
...
...
@@ -54,9 +60,9 @@ done
i
=
1
echo
-n
"Banging..."
/opt/slapos/bin/bang
-m
"Rebooted"
$SLAPOS_CONFIGURATION
/slapos.cfg
while
[
[
$?
!=
0
]
]
;
do
while
[
$?
!=
0
]
;
do
sleep
$((
$i
*
60
))
if
[
[
$i
< 20
]
]
;
then
if
[
$i
< 20
]
;
then
let
i++
fi
echo
"Retrying Bang"
...
...
slapos-node/template/openvpn/vifib-keys/ca.crt
0 → 100644
View file @
e7994556
-----BEGIN CERTIFICATE-----
MIIDYDCCAsmgAwIBAgIJAKdgIUTuXOGkMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNV
BAYTAkZSMQ4wDAYDVQQIEwVQQVJJUzEOMAwGA1UEBxMFUGFyaXMxFjAUBgNVBAMT
DUlw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----
\ No newline at end of file
slapos-node/template/openvpn/vifib-keys/client-vifib.crt
0 → 100644
View file @
e7994556
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 2 (0x2)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=FR, ST=PARIS, L=Paris, CN=Ipv6-provider/name=Ipv6-provider/emailAddress=leninivi@enst.fr
Validity
Not Before: Jan 24 14:52:25 2012 GMT
Not After : Jan 21 14:52:25 2022 GMT
Subject: C=FR, ST=CA, L=SanFrancisco, O=Fort-Funston, CN=CLient/name=Client
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
00:c8:bf:8d:ec:37:3f:c3:a3:53:57:a3:9f:c9:93:
bf:bc:f4:ff:5b:b9:c2:ca:14:b9:21:2d:75:5d:46:
d2:9a:52:31:83:3d:b8:a3:49:4f:2c:92:44:6e:e1:
d6:43:27:c0:d6:31:43:7a:fc:4b:29:0f:29:5c:44:
b5:c5:01:90:0f:99:ff:e4:e1:3d:37:04:06:7e:09:
ae:d4:36:ac:4f:d9:37:7c:ac:e3:66:11:5d:78:48:
b0:32:4d:c8:e1:72:a7:76:2e:3b:87:a3:43:33:5d:
15:6c:33:f9:e0:ab:07:a1:20:d2:4b:12:33:69:33:
ef:ee:3f:bc:a2:90:85:2f:53
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
Easy-RSA Generated Certificate
X509v3 Subject Key Identifier:
47:C1:C8:5B:DD:E8:E7:90:66:B8:40:F3:CE:A7:BC:E5:E7:34:D8:CC
X509v3 Authority Key Identifier:
keyid:BA:D3:5A:0F:EF:44:0C:42:60:85:79:6A:4E:F9:0C:41:54:6B:9B:6E
DirName:/C=FR/ST=PARIS/L=Paris/CN=Ipv6-provider/name=Ipv6-provider/emailAddress=leninivi@enst.fr
serial:A7:60:21:44:EE:5C:E1:A4
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital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jAA
MC0GCWCGSAGG+EIBDQQgFh5FYXN5LVJTQSBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw
HQYDVR0OBBYEFEfByFvd6OeQZrhA886nvOXnNNjMMIGyBgNVHSMEgaowgaeAFLrT
Wg/vRAxCYIV5ak75DEFUa5tuoYGDpIGAMH4xCzAJBgNVBAYTAkZSMQ4wDAYDVQQI
EwVQQVJJUzEOMAwGA1UEBxMFUGFyaXMxFjAUBgNVBAMTDUlwdjYtcHJvdmlkZXIx
FjAUBgNVBCkTDUlwdjYtcHJvdmlkZXIxHzAdBgkqhkiG9w0BCQEWEGxlbmluaXZp
QGVuc3QuZnKCCQCnYCFE7lzhpDATBgNVHSUEDDAKBggrBgEFBQcDAjALBgNVHQ8E
BAMCB4AwDQYJKoZIhvcNAQEFBQADgYEAT3/rb4ZJF54TwVpSw4trHAYVBtG9xJX0
TJEMSxfq+h0Acvv9XB+dJv56Ziz0P1XmIX4PubcnZZKV1TjkuXWyO630JGfai24Q
ta1HWDFOx+U+wL6ZWWWJvf+TxxEeBwd6IzM6jbzLapoHRTrEJAD1N/Xc6CJH3Gxj
9WEM+7L9JAg=
-----END CERTIFICATE-----
\ No newline at end of file
slapos-node/template/openvpn/vifib-keys/client-vifib.key
0 → 100644
View file @
e7994556
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDIv43sNz/Do1NXo5/Jk7+89P9bucLKFLkhLXVdRtKaUjGDPbij
SU8skkRu4dZDJ8DWMUN6/EspDylcRLXFAZAPmf/k4T03BAZ+Ca7UNqxP2Td8rONm
EV14SLAyTcjhcqd2LjuHo0MzXRVsM/ngqwehINJLEjNpM+/uP7yikIUvUwIDAQAB
AoGAFcjz1daJDOoEeVZAWNe3zwGnVITsJpHpJTiRq/WrlSOmS9++0bl65hNZac8I
OXFu88+Uyxvl7CbBDkpGj4KD53xSNG+hd52fa0neqPTbrzRdsqMSAfziUdnOWjP1
DeXBTd8AudX0F2pQehUXFKo2ENcjAYL7ArxIgp1AvPluy0ECQQDlMY3TPtv1Gqcp
kjKymfofOt0XupXqondUyKz+VCQQIpC+TXiJMsN/bU9B7gq/XlyFX6KaiXLlfDUE
Qt0KBoqtAkEA4DpMnzPxsjtI3N/EzxAsQgRvLVM/69StlSgrGDGT0SBEKpTCjQlV
JH/thN2yvhCJiAQOeqsyOnc4BFqXX3vh/wJBANE8OhPeUQQkfvMuquXuODAGlw0w
o+h+xZ47TeMpgXrRc36oTyBBncRZUIAKBvnJ9YE1W8blMGVczTHEsPKUIkkCQD7y
Xtw6mtlsJzJKZ1extJr737IbstAjrm83DZIHKPYGVtyVUmCBhDNw7l7kVe9heRqD
+QSa1sju+vzN6bzWbEUCQAdhz+m51y2W447yjyn3KqU0LnIVErdPkKW9ct1WO4f1
fDzyybocUpZGSVKld0ScAlsuZ6CeWq/nR8ugYorMUj4=
-----END RSA PRIVATE KEY-----
\ No newline at end of file
slapos-node/template/openvpn/vifib.conf
0 → 100644
View file @
e7994556
client
dev
tapVPN
proto
tcp
remote
176
.
31
.
103
.
87
port
443
resolv
-
retry
infinite
nobind
persist
-
key
persist
-
tun
ca
/
etc
/
openvpn
/
vifib
-
keys
/
ca
.
crt
cert
/
etc
/
openvpn
/
vifib
-
keys
/
client
-
vifib
.
crt
key
/
etc
/
openvpn
/
vifib
-
keys
/
client
-
vifib
.
key
ns
-
cert
-
type
server
verb
3
\ No newline at end of file
slapos-node/template/slapos-node.cron.d
View file @
e7994556
...
...
@@ -7,3 +7,4 @@ MAILTO=root
0
0
*
*
*
root
/
opt
/
slapos
/
bin
/
slapgrid
-
ur
--
verbose
--
logfile
=/
opt
/
slapos
/
slapgrid
-
ur
.
log
--
pidfile
=/
opt
/
slapos
/
slapgrid
-
ur
.
pid
/
etc
/
opt
/
slapos
/
slapos
.
cfg
>>
/
opt
/
slapos
/
slapgrid
-
ur
.
log
2
>&
1
0
0
*
*
*
root
/
opt
/
slapos
/
bin
/
slapformat
--
verbose
--
log_file
=/
opt
/
slapos
/
slapformat
.
log
-
c
/
etc
/
opt
/
slapos
/
slapos
.
cfg
>>
/
opt
/
slapos
/
slapformat
.
log
2
>&
1
0
/
10
*
*
*
*
root
if
[
-
f
/
etc
/
opt
/
slapos
/
openvpn
-
needed
];
then
ifconfig
tapVPN
|
grep
"Scope:Global"
>
/
dev
/
null
;
if
[
$?
=
0
];
then
ROUTES
=$(
ip
-
6
r
l
|
grep
default
|
awk
'
{
print
$
5
}
'
);
for
GW
in
$
ROUTES
;
do
if
[
!
$
GW
=
tapVPN
];
then
/
sbin
/
ip
-
6
route
del
default
dev
$
GW
;
fi
;
done
;
fi
;
fi
\ No newline at end of file
slapprepare/slapprepare/script/slapos
View file @
e7994556
...
...
@@ -125,7 +125,6 @@ SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
0/10 * * * * root if [[ -f
${
SLAPOS_CONFIGURATION
}
/openvpn-needed ]]; then ip -6 route del dev br0 ; fi
"""
>
/etc/cron.d/slapos
if
[
-f
${
SLAPOS_CONFIGURATION
}
/SlapContainer-needed
]
;
then
...
...
templates/debian/cron.d
View file @
e7994556
...
...
@@ -7,3 +7,4 @@ MAILTO=root
0
0
*
*
*
root
/
opt
/
slapos
/
bin
/
slapgrid
-
ur
--
verbose
--
logfile
=/
opt
/
slapos
/
slapgrid
-
ur
.
log
--
pidfile
=/
opt
/
slapos
/
slapgrid
-
ur
.
pid
/
etc
/
opt
/
slapos
/
slapos
.
cfg
>>
/
opt
/
slapos
/
slapgrid
-
ur
.
log
2
>&
1
0
0
*
*
*
root
/
opt
/
slapos
/
bin
/
slapformat
--
verbose
--
log_file
=/
opt
/
slapos
/
slapformat
.
log
-
c
/
etc
/
opt
/
slapos
/
slapos
.
cfg
>>
/
opt
/
slapos
/
slapformat
.
log
2
>&
1
0
/
10
*
*
*
*
root
if
[
-
f
/
etc
/
opt
/
slapos
/
openvpn
-
needed
];
then
ifconfig
tapVPN
|
grep
"Scope:Global"
>
/
dev
/
null
;
if
[
$?
=
0
];
then
ROUTES
=$(
ip
-
6
r
l
|
grep
default
|
awk
'
{
print
$
5
}
'
);
for
GW
in
$
ROUTES
;
do
if
[
!
$
GW
=
tapVPN
];
then
/
sbin
/
ip
-
6
route
del
default
dev
$
GW
;
fi
;
done
;
fi
;
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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