Hello, my name is Toine
I would like your help for setting up my OpenVPN server installed on a VPS.
I have installed openvpn (configured with mysql, the plugin for pam authentification, all .crt etc ...) , mysql, libpam an I would like to use it with friends. So I would like to have multiple accounts ...
But today, without any authentification method, I can't connect to my vpn 🙁
File: client-udp.conf
client
dev tun
proto udp
remote __VPN_IP__ 53
nobind
auth-user-pass
reneg-sec 432000
resolv-retry infinite
ca ca.crt
comp-lzo
verb 1
File: server-udp-53.conf
##protocol port
port 53
proto udp
dev tun
##ip server client
server 10.4.0.0 255.255.255.0
##key
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
##option
persist-key
persist-tun
keepalive 5 60
reneg-sec 432000
##option authen.
comp-lzo
#user nobody
#group nogroup
#client-to-client
username-as-common-name
client-cert-not-required
#plugin /usr/lib/openvpn/openvpn-auth-pam.so openvpn
auth-user-pass-verify /etc/openvpn/script/login.sh via-env
##push to client
max-clients 50
push "persist-key"
push "persist-tun"
push "redirect-gateway def1"
For tests I put "auth-user-pass-verify /etc/openvpn/script/login.sh via-env"
login.sh is juste "exit 0" -> That allows everybody to connect
When I want to connect to my VPN I have :
openvpn client-udp.conf
Sun Nov 3 12:22:29 2013 OpenVPN 2.2.1 i686-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Feb 27 2013
Enter Auth Username:a
Enter Auth Password:a
Sun Nov 3 12:22:31 2013 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Sun Nov 3 12:22:31 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sun Nov 3 12:22:31 2013 LZO compression initialized
Sun Nov 3 12:22:31 2013 UDPv4 link local: [undef]
Sun Nov 3 12:22:31 2013 UDPv4 link remote: [AF_INET]5.135.247.131:53
Sun Nov 3 12:22:31 2013 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sun Nov 3 12:22:32 2013 [server] Peer Connection Initiated with [AF_INET]5.135.247.131:53
Sun Nov 3 12:22:34 2013 Note: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
Sun Nov 3 12:22:34 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sun Nov 3 12:22:34 2013 /sbin/ifconfig 10.4.0.10 pointopoint 10.4.0.9 mtu 1500
SIOCSIFADDR: Permission denied
: ERROR while getting interface flags: No such device
SIOCSIFDSTADDR: Permission denied
: ERROR while getting interface flags: No such device
SIOCSIFMTU: Operation not permitted
Sun Nov 3 12:22:34 2013 Linux ifconfig failed: external program exited with error status: 1
Sun Nov 3 12:22:34 2013 Exiting
What's wrong ? Could you help me ?
(Sorry for my bad english, I'm french ...)
Thank you !