Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Everytime I try and connect with the below profile it gets stuck on "logging in"

client
dev tun
proto tcp
remote IP 443
resolv-retry infinite
nobind
persist-key
persist-tun
comp-lzo
verb 3
<ca> SERVER.CA
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
<cert> SERVER.CRT
Certificate:
...
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</cert>
<key> SERVER.KEY
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
</key>

I used the following build options:

cp -r /usr/share/doc/openvpn-2.2.2/easy-rsa/ /etc/openvpn/
cp -irv /etc/openvpn/easy-rsa/2.0/openssl-1.0.0.cnf /etc/openvpn/easy-rsa/2.0/openssl.cnf
cd /etc/openvpn/easy-rsa/2.0
chmod 755 *
source ./vars
./vars
./clean-all
./build-ca
./build-key-server server
./build-dh

server.conf

port 443 #- port
proto tcp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
plugin /etc/openvpn/openvpn-auth-pam.so /etc/pam.d/login
#plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login #- Comment this line if you are using FreeRADIUS
#plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf #- Uncomment this line if you are using FreeRADIUS
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3
share|improve this question

closed as off-topic by DanBig, Nathan C, Dave M, Ward, mdpc Oct 2 '13 at 19:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – DanBig, Nathan C, Dave M, Ward, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Log files? There should be one. –  Nathan C Oct 2 '13 at 14:32

1 Answer 1

up vote 0 down vote accepted

It looks like you are trying to use a user to connect in the server config setup. However, in the client, you are trying to use keys.

Use the following:

client
dev tun
proto tcp
remote IP 443
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
auth-user-pass
comp-lzo
verb 3
<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.