Added example scripts and updated documentation.

This commit is contained in:
Nikos Mavrogiannopoulos
2013-02-12 19:19:02 +01:00
parent 35ce549e9e
commit 0e31edee4a
7 changed files with 24 additions and 6 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
EXTRA_DIST = design.dia sample.config EXTRA_DIST = design.dia sample.config scripts/ocserv-up scripts/ocserv-down
dist_man_MANS = ocserv.1 dist_man_MANS = ocserv.1
+3 -2
View File
@@ -2,7 +2,7 @@
.\" .\"
.\" DO NOT EDIT THIS FILE (ocserv-args.man) .\" DO NOT EDIT THIS FILE (ocserv-args.man)
.\" .\"
.\" It has been AutoGen-ed February 12, 2013 at 06:56:01 PM by AutoGen 5.16 .\" It has been AutoGen-ed February 12, 2013 at 07:18:42 PM by AutoGen 5.16
.\" From the definitions ../src/ocserv-args.def.tmp .\" From the definitions ../src/ocserv-args.def.tmp
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.\" .\"
@@ -97,6 +97,7 @@ $ certtool \-\-generate\-self\-signed \-\-load\-privkey ca\-key.pem \
$ certtool \-\-generate\-privkey \-\-outfile user\-key.pem $ certtool \-\-generate\-privkey \-\-outfile user\-key.pem
$ cat << _EOF_ >user.tmpl $ cat << _EOF_ >user.tmpl
cn = "user" cn = "user"
ou = "admins"
serial = 1824 serial = 1824
email = "user@example.com" email = "user@example.com"
expiration_days = 9999 expiration_days = 9999
@@ -269,7 +270,7 @@ The operation failed or the command syntax was not valid.
.in +4 .in +4
.ti -4 .ti -4
\fB*\fP \fB*\fP
Supports both TCP and UDP VPN tunnels using TLS and DTLS. Supports both TCP and UDP VPN tunnels using TLS and Datagram TLS.
.ti -4 .ti -4
\fB*\fP \fB*\fP
Support for the server key being stored in TPM, a hardware security module (HSM), or smart card. Support for the server key being stored in TPM, a hardware security module (HSM), or smart card.
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
iptables -D INPUT -i $DEVICE -j ACCEPT
echo "User '$USERNAME' from '$IP_REAL' disconnected."
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# Disable the firewall for the user's device
iptables -A INPUT -i $DEVICE -j ACCEPT
if [ "$GROUPNAME" != "admins" ];then
#rate limit the tun device to 64kbyte
wondershaper $DEVICE 524288 524288
fi
echo "User '$USERNAME' from '$IP_REAL' connected. Local IP is '$IP_REMOTE'"
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* DO NOT EDIT THIS FILE (ocserv-args.c) * DO NOT EDIT THIS FILE (ocserv-args.c)
* *
* It has been AutoGen-ed February 12, 2013 at 06:56:00 PM by AutoGen 5.16 * It has been AutoGen-ed February 12, 2013 at 07:18:40 PM by AutoGen 5.16
* From the definitions ocserv-args.def * From the definitions ocserv-args.def
* and the template file options * and the template file options
* *
+2 -1
View File
@@ -226,6 +226,7 @@ $ certtool --generate-self-signed --load-privkey ca-key.pem \
$ certtool --generate-privkey --outfile user-key.pem $ certtool --generate-privkey --outfile user-key.pem
$ cat << _EOF_ >user.tmpl $ cat << _EOF_ >user.tmpl
cn = "user" cn = "user"
ou = "admins"
serial = 1824 serial = 1824
email = "user@example.com" email = "user@example.com"
expiration_days = 9999 expiration_days = 9999
@@ -269,7 +270,7 @@ doc-section = {
ds-text = <<-_EOT_ ds-text = <<-_EOT_
@subheading Features of the server @subheading Features of the server
@itemize @itemize
@item Supports both TCP and UDP VPN tunnels using TLS and DTLS. @item Supports both TCP and UDP VPN tunnels using TLS and Datagram TLS.
@item Support for the server key being stored in TPM, a hardware security module (HSM), or smart card. @item Support for the server key being stored in TPM, a hardware security module (HSM), or smart card.
@item Authentication using PAM (username-password) or certificates @item Authentication using PAM (username-password) or certificates
@item Privilege separation between the main process which performs TUN allocation and authentication, with the worker processes which handles messages from the client. @item Privilege separation between the main process which performs TUN allocation and authentication, with the worker processes which handles messages from the client.
+1 -1
View File
@@ -2,7 +2,7 @@
* *
* DO NOT EDIT THIS FILE (ocserv-args.h) * DO NOT EDIT THIS FILE (ocserv-args.h)
* *
* It has been AutoGen-ed February 12, 2013 at 06:56:00 PM by AutoGen 5.16 * It has been AutoGen-ed February 12, 2013 at 07:18:40 PM by AutoGen 5.16
* From the definitions ocserv-args.def * From the definitions ocserv-args.def
* and the template file options * and the template file options
* *