openvpn username password auth

por | 2 julio, 2014

edit /etc/openvpn/server.conf

CENTOS X64

# Username and Password authentication.
client-cert-not-required
plugin /usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so login

RASPBERRY

# Username and Password authentication.
client-cert-not-required
plugin /usr/lib/openvpn/openvpn-auth-pam.so login

Also script for firewall

cat firewall-openvpn-rules.sh
#!/bin/sh
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to-source 11.22.33.44

11.22.33.44 you RPI address

Add pre-up /etc/firewall-openvpn-rules.sh We want to add a line below it at an indent. So this is what the two lines, existing and new, will look like when you’re done:

# cat /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp
pre-up /etc/firewall-openvpn-rules.sh
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp