howto/openvpn.md
... ...
@@ -0,0 +1,34 @@
1
+# Example Configuration, if you have direct connection to your peer
2
+
3
+* Replace <PEER_NAME> with a self chosen name to identify this peer
4
+* Replace <PROTO> with either `udp` or `udp6`, depending if you reach your remote peer with ipv4 o ipv6
5
+* Replace <REMOTE_HOST> with the public ip address of your peer
6
+* Replace <REMOTE_PORT> with the port number, where your peer's openvpn daemon listen for traffic
7
+* Replace <LOCAL_HOST> with your public ip
8
+* Replace <INTERFACE_NAME> with a self chosen name, this will be the name of your network interface (tun device) for this peering
9
+* Replace <LOCAL_GATEWAY_IP> with your own dn42 ip address
10
+* Replace <REMOTE_GATEWAY_IP> with dn42 ip address of your peer
11
+
12
+```
13
+#/etc/openvpn/<PEER_NAME>
14
+daemon
15
+proto <PROTO>
16
+mode p2p
17
+remote <REMOTE_HOST>
18
+rport <REMOTE_PORT>
19
+local <LOCAL_HOST>
20
+lport <LOCAL_PORT>
21
+dev-type tun
22
+dev <INTERFACE_NAME>
23
+comp-lzo
24
+persist-key
25
+persist-tun
26
+ifconfig <LOCAL_GATEWAY_IP> <REMOTE_GATEWAY_IP>
27
+secret /etc/openvpn/<PEER_NAME>.key
28
+```
29
+
30
+then create a new key and share it with your peer
31
+
32
+```
33
+$ openvpn --genkey --secret /etc/openvpn/<PEER_NAME>.key
34
+```
... ...
\ No newline at end of file