jchan172 / raspberrypi-vpn

Steps to create a VPN server using a Raspberry Pi
14 stars 5 forks source link

Duck DNS error #1

Open freshwater2015 opened 9 years ago

freshwater2015 commented 9 years ago

The VPN server works perfectly following this repo, but there is a small but significant problem with the Duck DNS service. If you introduce your DNS address as http://mydomain.duckdns.org the dynamic DNS service will not work. You have to introduce your address without the http://, that is mydomain.duckdns.org. Then it works perfectly :-)

jchan172 commented 9 years ago

So are you saying that step 3 of Client Side Setup that says

client
dev tun
proto udp
remote <INSERT YOUR DYNAMIC DNS ADDRESS> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20

INSERT YOUR DYNAMIC DNS ADDRESS you would insert something like mydomain.duckdns.org, as opposed to http://mydomain.duckdns.org? If so, I'll make a note of that in the instructions.

freshwater2015 commented 9 years ago

Yes, exactly. And I guess that you don't have to introduce the < and > symbols in the final script, right?

jchan172 commented 9 years ago

Correct. Just pushed an update.

On a separate note, have you successfully used keys on phones? I've tried using keys on OpenVPN on both Android and iOS, and I can't seem to get them to work. Wondering if other people have the same issue.

freshwater2015 commented 9 years ago

Yes, I was successful in using the keys in an iPhone, using the OpenVPN app. Also on a Windows PC. Everything seems to work fine following your repo (although I also combined it with the ReadWrite tutorial). Is it giving you any errors?

naloxone commented 9 years ago

I am still getting server poll timeout errors while Looking Up DNS Name when I try to connect from anywhere outside my home LAN on both iOS and OSX, so I'm going through all of these guides with a fine tooth comb looking for my mistake.

Is line 21 supposed to read $NAME$CR or $NAME$CRT? I did change it to CRT on my machine to no avail, but just in case it is an issue for someone else.

Also, a comment on the server.conf of the ReadWrite code mentioned verb needs to be set to 2 or higher due to updated version of OpenSSL. Any thoughts here for either the server.conf or this set of code?

Thanks for your work, jchan172 and all contributing!

jchan172 commented 9 years ago

@naloxone Yes, line 21 in makeOVPN.sh should be $NAME$CRT, but that is an insignificant line, as that line outputs text to the user. I'll change that. verb being set to 2 shouldn't make any difference, as that sets the log verbosity level, basically how much logging it displays. 0 is fatal errors only, and 9 is to output everything. Have you performed step 1 of Client Side Setup, where you create a cron job on Raspberry Pi to update DuckDNS of your public IP? Also, please create a new issue and paste what you wrote in that issue. This helps keep things more organized. Thanks!

jchan172 commented 9 years ago

@freshwater2015 To access the VPN on iOS, how did you transfer the key over? I'm wondering if I did that part wrong.

freshwater2015 commented 9 years ago

@jchan172 I'm using the app 'OpenVPN Connect'. If you send the .ovpn file by email to yourself, and you open it with the Mail app (or probably any other iOS mail app, I'm using Spark and it works), then you can use OpenVPN Connect to open the .ovpn file. And for me it works nicely :-)