Selaa lähdekoodia

Merge pull request #131 from jlund/openvpn-improvements

OpenVPN improvements
Alex Payne 11 vuotta sitten
vanhempi
commit
f24a8a5dd7

+ 1
- 1
roles/common/tasks/ufw.yml Näytä tiedosto

20
     - 5222/tcp  # xmpp c2s
20
     - 5222/tcp  # xmpp c2s
21
     - 5269/tcp  # xmpp s2s
21
     - 5269/tcp  # xmpp s2s
22
     - 6697/tcp  # znc
22
     - 6697/tcp  # znc
23
-    - openvpn/udp
23
+    - "{{ openvpn_port }}/{{ openvpn_protocol }}"
24
     - 60000:61000/udp  # mosh udp packets
24
     - 60000:61000/udp  # mosh udp packets
25
 
25
 
26
 - name: Check status of ufw
26
 - name: Check status of ufw

+ 4
- 2
roles/vpn/templates/client.cnf.j2 Näytä tiedosto

1
 client
1
 client
2
 dev tun
2
 dev tun
3
-proto udp
4
-remote {{ openvpn_server }} 1194
3
+proto {{ openvpn_protocol }}
4
+remote {{ openvpn_server }} {{ openvpn_port }}
5
+cipher {{ openvpn_cipher }}
6
+auth {{ openvpn_auth_digest }}
5
 resolv-retry infinite
7
 resolv-retry infinite
6
 nobind
8
 nobind
7
 persist-key
9
 persist-key

+ 2
- 2
roles/vpn/templates/etc_openvpn_server.conf.j2 Näytä tiedosto

29
 # on the same machine, use a different port
29
 # on the same machine, use a different port
30
 # number for each one.  You will need to
30
 # number for each one.  You will need to
31
 # open up this port on your firewall.
31
 # open up this port on your firewall.
32
-port 1194
32
+port {{ openvpn_port }}
33
 
33
 
34
 # TCP or UDP server?
34
 # TCP or UDP server?
35
 ;proto tcp
35
 ;proto tcp
36
-proto udp
36
+proto {{ openvpn_protocol }}
37
 
37
 
38
 # "dev tun" will create a routed IP tunnel,
38
 # "dev tun" will create a routed IP tunnel,
39
 # "dev tap" will create an ethernet tunnel.
39
 # "dev tap" will create an ethernet tunnel.

+ 2
- 0
vars/defaults.yml Näytä tiedosto

61
 openvpn_dhparam: "{{ openvpn_path }}/dh{{ openvpn_key_size }}.pem"
61
 openvpn_dhparam: "{{ openvpn_path }}/dh{{ openvpn_key_size }}.pem"
62
 openvpn_hmac_firewall: "{{ openvpn_path }}/ta.key"
62
 openvpn_hmac_firewall: "{{ openvpn_path }}/ta.key"
63
 openvpn_server: "{{ domain }}"
63
 openvpn_server: "{{ domain }}"
64
+openvpn_port: "1194"
65
+openvpn_protocol: "udp"
64
 # openvpn_clients: (required)
66
 # openvpn_clients: (required)
65
 
67
 
66
 # webmail
68
 # webmail

Loading…
Peruuta
Tallenna