Auto-login When Connecting To Server Even Though 'auth-user-pass' Enabled

Post Reply
simon_lefisch
OpenVpn Newbie
Posts: 4
Joined: Mon Jul 10, 2017 12:01 am

Auto-login When Connecting To Server Even Though 'auth-user-pass' Enabled

Post by simon_lefisch » Fri Jul 14, 2017 3:30 pm

Hi everyone,

I'm new to the forum and have searched everywhere to find an answer to my question but have not had any luck, so please be gentle.

I have a home server running CentOS 7 and have setup OpenVPN. I created a client .ovpn file that I use on my Mac (with Tunnelblick) and my iPhone (with OpenVPN Connect). In the client.ovpn file I have set the auth-user-pass argument forcing me to input my username/password credentials, which works on my Mac. However after importing the file into my iPhone it does not ask for my credentials. It just auto-connects to the server. Below is the server.conf and client.ovpn configs. Can anyone shine any light as to why the auth-user-pass works on my Mac and not my iPhone? TIA

server.conf

Code: Select all

port <port_number>
proto tcp
dev tun
ca /path/to/ca
cert /path/to/cert
key /path/to/key
dh /path/to/dh
topology subnet
server 10.10.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client-to-client
keepalive 10 120
tls-auth /path/to/ta
cipher AES-256-CBC
comp-lzo
max-clients 2
user nobody
group nobody
persist-key
persist-tun
status /etc/openvpn/logs/openvpn-status.log
log-append  /etc/openvpn/logs/openvpn.log
verb 4
explicit-exit-notify 1
client.ovpn

Code: Select all

client
dev tun
proto udp
remote <server_address:port>
resolv-retry infinite

cipher AES-256-CBC
remote-cert-tls server

auth-user-pass
auth-nocache
nobind
tun-mtu 1500
#tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
comp-lzo
reneg-sec 0
verb 4

#ca /path/to/ca.crt
#cert /path/to/client.crt
#key /path/to/client.key
#tls-auth /path/to/ta.key

<ca>
[ca info]
</ca>

<cert>
[cert info]
</cert>

<key>
[key info]
</key>

key-direction 1

<tls-auth>
[key info]
</tls-auth>

simon_lefisch
OpenVpn Newbie
Posts: 4
Joined: Mon Jul 10, 2017 12:01 am

Re: Auto-login When Connecting To Server Even Though 'auth-user-pass' Enabled

Post by simon_lefisch » Wed Jul 19, 2017 11:54 pm

No one has any idea?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 3006
Joined: Fri Jun 03, 2016 1:17 pm

Re: Auto-login When Connecting To Server Even Though 'auth-user-pass' Enabled

Post by TinCanTech » Thu Jul 20, 2017 12:14 pm

simon_lefisch wrote: In the client.ovpn file I have set the auth-user-pass argument forcing me to input my username/password credentials, which works on my Mac. However after importing the file into my iPhone it does not ask for my credentials. It just auto-connects to the server
I can not explain that .. perhaps there is something in your client log file.

However, according to the server config you have posted, you are not asking your clients for a user/pass so they will all connect regardless of sending user/pass credentials.

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

simon_lefisch
OpenVpn Newbie
Posts: 4
Joined: Mon Jul 10, 2017 12:01 am

Re: Auto-login When Connecting To Server Even Though 'auth-user-pass' Enabled

Post by simon_lefisch » Thu Jul 27, 2017 2:59 pm

TinCanTech wrote:
simon_lefisch wrote: In the client.ovpn file I have set the auth-user-pass argument forcing me to input my username/password credentials, which works on my Mac. However after importing the file into my iPhone it does not ask for my credentials. It just auto-connects to the server
I can not explain that .. perhaps there is something in your client log file.

However, according to the server config you have posted, you are not asking your clients for a user/pass so they will all connect regardless of sending user/pass credentials.

See:
https://openvpn.net/index.php/open-sour ... .html#auth
Hi @TinCanTech, thanks for the response. Sorry for the delay. Been out of town for a while. I will check out that link. The thing is that I have to enter my creds when connecting my from Mac, but not from my iPhone. Really strange. I'll report back when I have read thru and tested.

Post Reply