257986

.

Sun Sep 30, 2018 4:22 am

.
Last edited by 257986 on Sun Mar 14, 2021 5:38 pm, edited 1 time in total.

Channelhugger
Posts: 1
Joined: Thu Jan 03, 2019 9:20 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Thu Jan 03, 2019 9:42 pm

Please could you clarify the editing of the network configuration file. In my case my ip address is 192.168.1.139 and my modem address is 192.168.1.254.
In my case is this correct:-

auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
up route add -net 192.168.1.139 netmask 255.255.255.0 gw 192.168.1.254 metric 300

Thanks

257986

Sun Feb 03, 2019 11:47 pm

.
Last edited by 257986 on Sun Mar 14, 2021 5:37 pm, edited 1 time in total.

gwrichard
Posts: 1
Joined: Mon Apr 15, 2019 8:46 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Mon Apr 15, 2019 8:55 pm

Hi,

Was wondering if you could provide a bit of clarification on allowing local connections from multiple subnets. I run a home VPN Server on my router (OpenVPN) which provides a different subnet to clients connecting (10.8.0.0).

I have added both the standard network and VPN subnet to the allowed list in the iptables rules

Code: Select all

#Allow all local traffic.
sudo iptables -A INPUT -s 192.168.29.0/24,10.8.0.0/24 -j ACCEPT
sudo iptables -A OUTPUT -d 192.168.29.0/24,10.8.0.0/24 -j ACCEPT
If the VPN service is disabled on the Pi, I can connect.

Code: Select all

sudo service openvpn stop
.

However, if the service is started, only the traffic from the 192.168.29.0 range is allowed. Since I can connect if the openvpn service is disabled, it seems to not be related to my iptables rules.

Any help you can provide would be appreciated.

Thanks

nerdymedic
Posts: 1
Joined: Sat Aug 10, 2019 10:15 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Sat Aug 10, 2019 10:18 pm

I was using netatalk so that I could connect to the Pi from my mac for file storage, but this broke it. What do I need to do with iptables to restore that?

tapuleo
Posts: 1
Joined: Sun Aug 11, 2019 10:56 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Sun Aug 11, 2019 10:57 pm

I've got this working with eth0, but am having trouble getting it to work with wlan0. The Pi will be on a wireless network. Any tips?

droopie
Posts: 15
Joined: Sun Apr 26, 2015 8:34 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Sun Feb 09, 2020 4:12 am

great tutorial. no issues. i would like to see if its possible to do port forwarding for my torrent client. keeps giving me a port closed and dont know how to do it since i already have the port forwarding in my router but still says its closed. not sure if i can do it on iptables.

will5023
Posts: 2
Joined: Thu Feb 06, 2020 9:26 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Sun Feb 09, 2020 10:31 pm

When I get to this part:
CHANGE
Code: Select all

auth-user-pass
ca ca.rsa.2048.crt
crl-verify crl.rsa.2048.pem

TO
Code: Select all

auth-user-pass /etc/openvpn/login
crl-verify /etc/openvpn/crl.rsa.2048.pem
ca /etc/openvpn/ca.rsa.2048.crt
the contents of ex.conf are this:
client
dev tun
proto udp
remote us-east.privateinternetaccess.com 1198
resolv-retry infinite
nobind
persist-key
persist-tun
cipher aes-128-cbc
auth sha1
tls-client
remote-cert-tls server

auth-user-pass
compress
verb 1
reneg-sec 0
<crl-verify>
-----BEGIN X509 CRL-----
MIICWDC<snipped for space>BOzWMwr58A==
-----END X509 CRL-----
</crl-verify>

<ca>
-----BEGIN CERTIFICATE-----
MIIFqzCCBJOg<snipped for space>DMO6iwyIDRiU
-----END CERTIFICATE-----
</ca>

disable-occ
What should I change here?

Thanks!

droopie
Posts: 15
Joined: Sun Apr 26, 2015 8:34 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Sun Mar 29, 2020 7:32 pm

will5023 wrote: ca ca.rsa.2048.crt
crl-verify crl.rsa.2048.pem

TO
Code: Select all
same question. i have the same thing in my file. from my basic understanding, i assume that we delete everything from <crl-verify> to </crl-verify> and replace with the guides crl-verify. same with the ca. please confirm op!

bewareofgeek
Posts: 2
Joined: Fri Apr 03, 2020 7:17 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Wed Apr 08, 2020 9:26 pm

I completed the setup minus the network config portion, simply because I didn't understand why it was being done. I configured my router with a static lease and my pi is running on wifi. The VPN starts and runs fine for several minutes. Even though everything appears fine, I will lose internet connectivity, but the local lan still works. Obviously, the killswitch portion is working, but openvpn doesn't seem to think there is a problem.

Maybe the issue is that I didn't use the network config, so if you can help me understand why it's being configured that way, it will be a simple fix. Otherwise, any thoughts why it would drop the way it is.

If I can provide any logs or other info to help, let me know. Thanks for any help you can provide.

droopie
Posts: 15
Joined: Sun Apr 26, 2015 8:34 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Sat Jun 20, 2020 7:18 pm

is it possible to auto switch locations if pia cant connect to a server? for example, mexico has 2 locations ie 2 addresses. currently, the mexico address is down because that location has server outages but the mx address works. in this case, since only location in the config is down, it would be nice if it auto switched servers if no internet has been detected. i have to manually change the address in sudo nano /etc/openvpn/ex.conf when i catch an outage usually a day or two late.

droopie
Posts: 15
Joined: Sun Apr 26, 2015 8:34 pm

Re: Pi VPN Setup for PIA with killswitch and DHCP

Mon Jun 22, 2020 6:09 am

CAUTION! Something went wrong. As posted above, somehow, my IP got leaked and was hit with dmca notices.i think that when it was trying to connect to different server ips mine got leaked. The server outage matches dates in the notices. However, no internet connection is established when turning off openvpn or during the pia outage.

Return to “General discussion”