mirror of
https://git.dn42.dev/wiki/wiki
synced 2025-03-14 19:43:32 +00:00
Created openvpn (markdown)
This commit is contained in:
parent
7caefa0131
commit
673e8a81e1
34
howto/openvpn.md
Normal file
34
howto/openvpn.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Example Configuration, if you have direct connection to your peer
|
||||||
|
|
||||||
|
* Replace <PEER_NAME> with a self chosen name to identify this peer
|
||||||
|
* Replace <PROTO> with either `udp` or `udp6`, depending if you reach your remote peer with ipv4 o ipv6
|
||||||
|
* Replace <REMOTE_HOST> with the public ip address of your peer
|
||||||
|
* Replace <REMOTE_PORT> with the port number, where your peer's openvpn daemon listen for traffic
|
||||||
|
* Replace <LOCAL_HOST> with your public ip
|
||||||
|
* Replace <INTERFACE_NAME> with a self chosen name, this will be the name of your network interface (tun device) for this peering
|
||||||
|
* Replace <LOCAL_GATEWAY_IP> with your own dn42 ip address
|
||||||
|
* Replace <REMOTE_GATEWAY_IP> with dn42 ip address of your peer
|
||||||
|
|
||||||
|
```
|
||||||
|
#/etc/openvpn/<PEER_NAME>
|
||||||
|
daemon
|
||||||
|
proto <PROTO>
|
||||||
|
mode p2p
|
||||||
|
remote <REMOTE_HOST>
|
||||||
|
rport <REMOTE_PORT>
|
||||||
|
local <LOCAL_HOST>
|
||||||
|
lport <LOCAL_PORT>
|
||||||
|
dev-type tun
|
||||||
|
dev <INTERFACE_NAME>
|
||||||
|
comp-lzo
|
||||||
|
persist-key
|
||||||
|
persist-tun
|
||||||
|
ifconfig <LOCAL_GATEWAY_IP> <REMOTE_GATEWAY_IP>
|
||||||
|
secret /etc/openvpn/<PEER_NAME>.key
|
||||||
|
```
|
||||||
|
|
||||||
|
then create a new key and share it with your peer
|
||||||
|
|
||||||
|
```
|
||||||
|
$ openvpn --genkey --secret /etc/openvpn/<PEER_NAME>.key
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user