-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
pia-tools.groff
98 lines (98 loc) · 3.38 KB
/
pia-tools.groff
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.\" Manpage for pia-tools.
.\" Contact [email protected] to correct errors or typos.
.TH pia-tools 8 "26 November 2013" "1.0" "pia-tools man page"
.SH NAME
pia-tools \- OpenVPN hook for privateinternetaccess.com
.SH SYNOPSIS
pia-tools [\fIOPTIONS\fR]
.SH DESCRIPTION
Script to automate privateinternetacces port forwarding and starting/stopping transmission when connected/disconnected and other stuff
.SH OPTIONS
.TP
\fB\-p\fR, \fB \-\-port\fR
Request a new forwarding port
.TP
\fB\-a\fR, \fB \-\-allow\fR
Unblock all non-VPN traffic [default]
.TP
\fB\-d\fR, \fB \-\-disallow\fR
Block all non-VPN traffic
.TP
\fB\-g\fR, \fB \-\-pia\-dns\fR
Backup /etc/resolv.conf and create a new using PIA's DNS service
.TP
\fB\-\-google\-dns\fR
Backup /etc/resolv.conf and create a new one using Google's DNS service
.TP
\fB\-\-restore\-dns\fR
Restore /etc/resolv.conf from backup
.TP
\fB\-s\fR, \fB \-\-setup\fR
Run the interactive setup which will create the passwd and download the config files from PIA
.TP
\fB\-u\fR, \fB \-\-update\fR
Reset/Update the configuration files in PIA_CONFIG_DIR
.TP
\fB\-c\fR, \fB \-\-check\fR
Check if OpenVPN is running, if not stop transmissiond
.TP
\fB\-i\fR, \fB \-\-info\fR
Show information about the status of openvpn, transmission
.TP
\fB\-v\fR, \fB \-\-verbose\fR
Enable verbose output. In order to get really verbose you can also try bash -x pia-tools
.SH EXAMPLES
This ould typically be called within OpenVPN's up function:
.PP
.nf
.RS
pia-tools -rg
.RE
.fi
.PP
Which would request port forwarding and use PIA's DNS
The down function should call something like this:
.PP
.nf
.RS
pia-tools --restore-dns
.RE
.fi
.PP
.SH ENVIRONMENT
.IP \fBPIA_CONF\fR
Path to pia-tools.conf (default: /etc/pia-tools.conf)
.SH CONFIGURATION
.IP \fBPIA_CONFIG_DIR\fR
Where to store the OpenVPN config for PIA (default: /etc/openvpn/pia)
.IP \fBPIA_CONFIG_URL\fR
From where to fetch the OpenVPN config (default: https://www.privateinternetaccess.com/openvpn/openvpn.zip)
.IP \fBPIA_COMMON_CONFIG\fR
Path to a common config section that should be appended to all configs. Typically holds up and down scripts. (default: $PIA_CONFIG_DIR/pia_common)
.IP \fBPIA_SERVERS_FILE\fR
Path to the file holding all available exit point URLs (default: $PIA_CONFIG_DIR/piaservers)
.IP \fBPIA_SERVERS_IP_FILE\fR
Path to the file where all IPs from exit points from PIA_SERVERS_FILE are stored (default: $PIA_CONFIG_DIR/piaserverips)
.IP \fBPIA_PASSWD_FILE\fR
File holding your PIA credentials (default: $PIA_CONFIG_DIR/passwd)
.IP \fBPIA_CLIENT_ID_FILE\fR
File where your client-ID is stored (default: $PIA_CONFIG_DIR/clientid)
.IP \fBTRANSMISSION_SETTINGS_FILE\fR
Path to transmission config (default: /home/dl/.config/transmission-daemon/settings.json)
.IP \fBPIA_OPEN_PORT_FILE\fR
Path to the file where the currently open (forwarded) port is stored (default: $PIA_CONFIG_DIR/open_port)
.IP \fBVIRT_NET_DEV\fR
The virtual network device used by OpenVPN (device: tun0)
.IP \fBNETWORK_DEVICES\fR
A space separated string of the network devices to be used when adding and removing firewall rules with -a and -d. If not set, pia-tools will try to detect the device names. (e.g.: "eth0 wlp3s0 enp2s0")
.SH FILES
/etc/pia-tools.conf
/etc/openvpn/pia/
.SH SEE ALSO
.BR openvpn(8)
.SH BUGS
No known bugs. Open an issue on GitHub if you find one (Link to the repo below).
.SH AUTHOR
Philipp Schmitt ([email protected])
.br
Source: https://github.com/pschmitt/pia-tools