ubuntuusers.de

openvpn

Datum:
22. Februar 2012 08:58
Code:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
########################################################
#0 HIER EINSTELLUNGEN >> 1 client.conf >> 2 server.conf
########################################################
#      0
########################################################

#Die VPN Verbindung konnte nicht hergestellt werden,
#weil der Start des Dienste fehlgeschlagen ist

#Einstellungen OPENVPN

#IPV4 Automatisch verbinden

#VPN#
# Gateaway ip.des.servers
#Art Zertifikate TLS
#.......client.crt
#.......CA.crt
#.......clint.key

#Erweitert

#Gateaway port 1133
#Intervall leer
#LZO ja
#TCP nein
#TAP ja


############################################################
#...........................1
#############################################################
# Diese Datei liegt in /etc/openvpn/vpn-maschine-client.conf#
#############################################################
client
float
dev tap

#MTU
tun-mtu 1492
#fragment 1300
mssfix

#tcp oder udp
proto udp

#Server IP
remote xx.xx.xx.xx 1133
# lauscht auf 1133

#force authentication
#WICHTIG: hier den COMMON Name vom Server Zertifikat nehmen!
tls-remote vpn-maschine

dh	vpn-maschine-dh%KEY_SIZE%.pem
ca	vpn-maschine-CA.crt
cert	vpn-maschine-client.crt
key	vpn-maschine-client.key

auth SHA1
cipher AES-256-CBC
nobind
comp-lzo
persist-key
persist-tun
verb 0

# Nach dem Verbindungsaufbau wird eine Route zum lokalen Netz vom Server aus aufgebaut
# AUSKOMMENTIERT
# Beispiel: Subnetz 192.168.2.0/24
#route 192.168.2.0 255.255.255.0

# Default route ueber VPN (wenn du dein INTERNET komplett ueber openvpn routen willst)
# AUSKOMMENTIERT
route remote_host 255.255.255.255 net_gateway
route 0.0.0.0 0.0.0.0 vpn_gateway


############################################################
#...........................2
#############################################################
# Diese Datei liegt in /etc/openvpn/server.conf#
#############################################################


#################################################
# Sample OpenVPN 2.0 config file for            #
# multi-client server.                          #
#                                               #
# This file is for the server side              #
# of a many-clients <-> one-server              #
# OpenVPN configuration.                        #
#                                               #
# OpenVPN also supports                         #
# single-machine <-> single-machine             #
# configurations (See the Examples page         #
# on the web site for more info).               #
#                                               #
# This config should work on Windows            #
# or Linux/BSD systems.  Remember on            #
# Windows to quote pathnames and use            #
# double backslashes, e.g.:                     #
# "C:\\Program Files\\OpenVPN\\config\\foo.key" #
#                                               #
# Comments are preceded with '#' or ';'         #
#################################################

# Which local IP address should OpenVPN
# listen on? (optional)
#;local a.b.c.d
# xx.xx.xx.xx ist die Ip vom server
xx.xx.xx.xx
# Which TCP/UDP port should OpenVPN




client 
float 
dev tap 

#MTU 
tun-mtu 1492 
#fragment 1300 
mssfix 

#device name, unter linux nicht mehr auskommentieren (# löschen)
#dev-node vsn-device 

#tcp oder udp 
proto udp 

#Server IP 
remote 88.198.128.43 1133

#force authentication 
#WICHTIG: hier den COMMON Name vom Server Zertifikat nehmen!
tls-remote server 

#ca vpn-ca.pem 
#cert simon_lan_cert.pem 
#key simon_lan_key.pem 

auth SHA1 
#cipher aes-256-cbc 
nobind 
comp-lzo 
persist-key 
persist-tun 
verb 0 

# Nach dem Verbindungsaufbau wird eine Route zum lokalen Netz vom Server aus aufgebaut
# AUSKOMMENTIERT 
# Beispiel: Subnetz 192.168.2.0/24 
#route 192.168.2.0 255.255.255.0 

# Default route ueber VPN 
# AUSKOMMENTIERT 
#route remote_host 255.255.255.255 net_gateway 
#route 0.0.0.0 0.0.0.0 vpn_gateway 

ca ./easy-rsa2/keys/vpn-maschine-CA.crt
#cert ./easy-rsa2/keys/vpn-maschine-client.conf
cert ./easy-rsa2/keys/vpn-maschine-client.crt
key ./easy-rsa2/keys/vpn-maschine-client.key
dh ./easy-rsa2/keys/vpn-maschine-dh4096.pem

#ca ca.crt
#cert server.crt
#key server.key  # This file should be kept secret