summarylogtreecommitdiffstats
path: root/example.conf
blob: b63e3b76c984ac3e68cd2dfc7546a80d752e35b2 (plain)
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
# This file configures onetun using environment variables
# See onetun --help for more information

# The address (IP + port) of the Wireguard endpoint (remote).
ONETUN_ENDPOINT_ADDR=1.2.3.4:51820

# The address (IP + port) used to bind the local UDP socket for the WireGuard tunnel.
# Example: 1.2.3.4:30000. [default: 0.0.0.0:0 for IPv4 endpoints, or [::]:0 for IPv6 endpoints]
# ONETUN_ENDPOINT_BIND_ADDR=

# The public key of the Wireguard endpoint (remote).
ONETUN_ENDPOINT_PUBLIC_KEY=9Ztnedd1CxaLoWcxCCAusdamG2ag3ZRKtTLEEChnN2g=

# Configures a persistent keep-alive for the WireGuard tunnel, in seconds.
ONETUN_KEEP_ALIVE=25

# Configures the log level and format. See https://docs.rs/env_logger/0.9.0/env_logger/#enabling-logging for more
# information on syntax. [default: info]
# ONETUN_LOG=

# Configures the max-transmission-unit (MTU) of the WireGuard tunnel. [default: 1420]
# ONETUN_MTU=

# Decrypts and captures IP packets on the WireGuard tunnel to a given output file.
# ONETUN_PCAP=

# The private key of this peer. The corresponding public key should be registered in the Wireguard endpoint.
# You can also use 'ONETUN_PRIVATE_KEY_FILE=' to specify a file containing the key instead.
ONETUN_PRIVATE_KEY=uG76ogG4mYlOVe7N9+FEML790Zumecacihitssd/yF0=

# The path to a file containing the private key of this peer. The corresponding public key should be registered in the Wireguard endpoint.
# ONETUN_PRIVATE_KEY_FILE=

# The pre-shared key (PSK) as configured with the peer.
# ONETUN_PRESHARED_KEY=

# The source IP to identify this peer as (local).
ONETUN_SOURCE_PEER_IP=192.168.4.3

# Port forward configurations. The format of each argument is
# [src_host:]<src_port>:<dst_host>:<dst_port>[:TCP,UDP,...], where [src_host] is the local IP
# to listen on, <src_port> is the local port to listen on, <dst_host> is the remote peer IP
# to forward to, and <dst_port> is the remote port to forward to. Environment variables must be
# of the form 'ONETUN_PORT_FORWARD_[#]', where [#] starts at 1.
ONETUN_PORT_FORWARD_1=127.0.0.1:80:10.0.0.2:8080:TCP
ONETUN_PORT_FORWARD_2=127.0.0.1:443:10.0.0.2:8443:TCP,UDP
ONETUN_PORT_FORWARD_3=127.0.0.1:1900:10.0.0.2:1900