1 |
I've configured OpenVPN and it works OK but I can not seems to figure it out how to assign static IP to clients |
2 |
|
3 |
My server.conf port 8458 |
4 |
proto udp |
5 |
dev tun |
6 |
mode server |
7 |
ca /usr/share/openvpn/easy-rsa/keys/ca.crt |
8 |
cert /usr/share/openvpn/easy-rsa/keys/server.crt |
9 |
key /usr/share/openvpn/easy-rsa/keys/server.key |
10 |
dh /usr/share/openvpn/easy-rsa/keys/dh1024.pem |
11 |
server 192.168.139.0 255.255.255.0 |
12 |
client-to-client |
13 |
ifconfig-pool-persist ipp.txt |
14 |
client-config-dir ccd |
15 |
keepalive 10 120 |
16 |
tls-auth vpn_my.key 0 |
17 |
tun-mtu 1500 |
18 |
tun-mtu-extra 32 |
19 |
mssfix 1200 |
20 |
duplicate-cn |
21 |
comp-lzo |
22 |
max-clients 100 |
23 |
persist-key |
24 |
persist-tun |
25 |
status openvpn-status.log |
26 |
log /var/log/openvpn.log |
27 |
log-append /var/log/openvpn.log |
28 |
verb 3 |
29 |
|
30 |
On client in /etc/openvpn/ccd directory I've created a file "syscon9" with: |
31 |
ifconfig-push 192.168.139.15 192.168.139.1 |
32 |
|
33 |
This file suppose to have a name from client "CN" |
34 |
|
35 |
client.conf |
36 |
client |
37 |
dev tun |
38 |
proto udp |
39 |
remote 68.148.245.78 8458 |
40 |
resolv-retry infinite |
41 |
nobind |
42 |
tun-mtu 1500 |
43 |
tun-mtu-extra 32 |
44 |
mssfix 1200 |
45 |
persist-key |
46 |
persist-tun |
47 |
remote-cert-tls server |
48 |
ca "/etc/openvpn/client/ca.crt" |
49 |
cert "/etc/openvpn/client/syscon9.crt" |
50 |
key "/etc/openvpn/client/syscon9.key" |
51 |
tls-auth "/etc/openvpn/client/vpn.key" 1 |
52 |
comp-lzo |
53 |
log /var/log/openvpn.log |
54 |
log-append /var/log/openvpn.log |
55 |
verb 3 |
56 |
|
57 |
-- |
58 |
Joseph |