No username or password ?

Need help configuring your VPN? Just post here and you'll get that help.

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
aneng
OpenVpn Newbie
Posts: 4
Joined: Tue Apr 18, 2017 9:50 pm

No username or password ?

Post by aneng » Tue Apr 18, 2017 10:23 pm

Hi,

Please excuse my noobness ! I have managed to set up an OpenVPN server using this guide: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04

When I run the command sudo openvpn --config client1.ovpn on my linux client, it makes the VPN connection to my server without asking for a username or password.

I am trying to work out how to get my Raspberry Pi to make a connection to the VPN automatically when it boots up and have found a guide on how to do this here: https://nerddrivel.com/2016/03/25/install-and-configure-openvpn-on-osmckodi/ However, this guide requires you to create a separate file with your 'Openvpn username & password' - which, as I followed the setup guide above, I don't have !

What can I do to resolve this please ?

Many thanks.

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

Re: No username or password ?

Post by TinCanTech » Tue Apr 18, 2017 10:33 pm


aneng
OpenVpn Newbie
Posts: 4
Joined: Tue Apr 18, 2017 9:50 pm

Re: No username or password ?

Post by aneng » Tue Apr 18, 2017 10:53 pm

I don't wish to sound impertinent but do you really need the version of OpenVPN and my config files to answer that ? I've followed the guide in the link in my post, which has the entire config in it. I don't think I'm asking for an answer to a particularly knotty problem.

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

Re: No username or password ?

Post by TinCanTech » Tue Apr 18, 2017 11:18 pm

aneng wrote:I don't wish to sound impertinent but
Asking questions politely is not impertinent.
aneng wrote:do you really need the version of OpenVPN and my config files to answer that ?
They help us to help you .. a Lot ! Your logs are even more useful.
aneng wrote: I've followed the guide in the link in my post,
Then ask the author of your guide "why it does not work ?"
aneng wrote:which has the entire config in it
Which has "a" configuration in it ..
aneng wrote: I don't think I'm asking for an answer to a particularly knotty problem
It probably is not .. but I cannot determine that for myself due to the lack of detail you have posted.

I recommend the howto above.

aneng
OpenVpn Newbie
Posts: 4
Joined: Tue Apr 18, 2017 9:50 pm

Re: No username or password ?

Post by aneng » Wed Apr 19, 2017 9:26 am

Hi. OK, understood !

This is my server.conf;

Code: Select all

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
tls-auth ta.key 0
key-direction 0
cipher AES-128-CBC 
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
I have no idea what version of OpenVPN I'm running - I just followed the guide and installed it with "sudo apt-get openvpn" on Ubuntu.

On my client (linux), I just type in "sudo openvpn --config client1.ovpn" and it asks for my local sudo password then I'm up and running. It never asks for a username and password. I'm sure it must be something in that server.conf, but I can't see where.

My client1.ovpn is; (edited for security);

Code: Select all

client
dev tun
proto udp
remote <my server's ip> 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
cipher AES-128-CBC
auth SHA256
key-direction 1
comp-lzo
verb 3
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

<ca>
-----BEGIN CERTIFICATE-----

<certificate data>

-----END CERTIFICATE-----
</ca>
<cert>
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 2 (0x2)
    Signature Algorithm: sha256WithRSAEncryption

<more certificate data>

-----BEGIN CERTIFICATE-----

<and more certificate data!>

-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----

<private key data>

-----END PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----

<Static Key data>

-----END OpenVPN Static key V1-----
</tls-auth>

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

Re: No username or password ?

Post by TinCanTech » Wed Apr 19, 2017 9:43 am

aneng wrote:I have no idea what version of OpenVPN I'm running
Try harder .. :roll:
aneng wrote:I just followed the guide
We don't debug third party guides.
aneng wrote: It never asks for a username and password
You have not configured it to do so .. :geek:

https://openvpn.net/index.php/open-sour ... .html#auth

aneng
OpenVpn Newbie
Posts: 4
Joined: Tue Apr 18, 2017 9:50 pm

Re: No username or password ?

Post by aneng » Wed Apr 19, 2017 3:10 pm

Thanks for being so friendly and helpful.

SofianeLandez
OpenVpn Newbie
Posts: 4
Joined: Thu Mar 28, 2019 8:22 am

Re: No username or password ?

Post by SofianeLandez » Wed Apr 03, 2019 3:31 pm

So have you found a solution?

Post Reply