Close OpenVPN Leaks

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
quickcurrent
OpenVpn Newbie
Posts: 7
Joined: Tue Aug 29, 2017 1:16 pm

Close OpenVPN Leaks

Post by quickcurrent » Tue Aug 29, 2017 1:34 pm

I have just recently set up OpenVPN V 11.8.0.0 on a Raspberry Pi.

At setup time, I read that the ISP could get access to my transmissions, so I selected the Open DNS server instead. Then I found an article about VPN leaks and went to https://whoer.net/#extended to check on my leaks. Found three, of which I have plugged two. The third is more confounding for me.

This third leak is caused by my ISP being in Canada and Open DNS being in the USA, which was news to me! My displayed IP address is the one that my ISP issues. So I have been trying to change the DNS server to a Canadian one. This is the problem that I am having. I have tried several modifications to my client configuration file suggested online at other sites, none of which work. Then I read that the change has to be made to the server.conf file and pushed to the clients. So this is my dilemma.

I would like to do this without having to start from scratch. How can this be done? Is it done from the OpenVPN terminal window? How? Do I add something to the server.conf file? I have tried

push "dhcp-option DNS 10.66.0.4"
push "dhcp-option DNS 10.66.0.5"

but using Canadian server addresses, which did nothing!

Do I need to create and run a script to apply the changes to the server.conf file? If so, what would that script look like? How do I apply it?

Thanks for helping out a newbie.

quickcurrent

quickcurrent
OpenVpn Newbie
Posts: 7
Joined: Tue Aug 29, 2017 1:16 pm

Re: Close OpenVPN Leaks

Post by quickcurrent » Wed Aug 30, 2017 1:47 am

Sorry, but that example in the above link is Greek to me. Can anyone please respond to my questions directly?

quickcurrent
OpenVpn Newbie
Posts: 7
Joined: Tue Aug 29, 2017 1:16 pm

Re: Close OpenVPN Leaks

Post by quickcurrent » Tue Sep 05, 2017 12:29 pm

Alright, my server.config file reads as follows, after I changed the DNS servers from the original USA ones to Canadian ones (67.22.135.181 and 206.248.136.109) and re-booted the server:

dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/server.crt
key /etc/openvpn/easy-rsa/pki/private/server.key
dh /etc/openvpn/easy-rsa/pki/dh2048.pem
topology subnet
server 10.8.0.0 255.255.255.0
# server and remote endpoints
ifconfig 10.8.0.1 10.8.0.2
# Add route to Client routing table for the OpenVPN Server
push "route 10.8.0.1 255.255.255.255"
# Add route to Client routing table for the OPenVPN Subnet
push "route 10.8.0.0 255.255.255.0"
# your local subnet
push "route 0.0.0.0 "
# Set your primary domain name server address for clients
push "dhcp-option DNS 67.22.135.181"
push "dhcp-option DNS 206.248.136.109"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
duplicate-cn
keepalive 10 120
tls-version-min 1.2
tls-auth /etc/openvpn/easy-rsa/pki/ta.key 0
cipher AES-256-CBC
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
#crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
log /var/log/openvpn.log
verb 1
# Generated for use by PiVPN.io

I have not recreated new client config files. The site https://whoer.net/#extended still tells me that I am using the USA DNS server 74.125.45.1, thus generating a leak of my IP address. This server does not even appear in my server.conf file !!!

Any ideas why that is happening?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Close OpenVPN Leaks

Post by TinCanTech » Tue Sep 05, 2017 12:36 pm


Post Reply