1. port 6194
    2. proto udp
    3. dev tap
    4. up /home/openvpn/up.sh
    5. ca /home/openvpn/conf/server/ca.crt
    6. cert /home/openvpn/conf/server/server.crt
    7. dh /home/openvpn/conf/server/dh2048.pem
    8. key /home/openvpn/conf/server/server.key
    9. server-bridge 192.168.3.38 255.255.255.0 192.168.3.2 192.168.3.5
    10. keepalive 10 120
    11. sndbuf 0
    12. rcvbuf 0
    13. txqueuelen 1000
    14. persist-key
    15. persist-tun
    16. status /home/openvpn/logs/server/openvpn-status.log
    17. log-append /home/openvpn/logs/server/openvpn.log
    18. verb 5
    19. script-security 3
    20. auth-user-pass-verify /home/openvpn/checkpsw.sh via-env
    21. username-as-common-name
    #!/bin/bash
    #
    # 
    BRIDGE="br0"
    
    /usr/sbin/brctl addif ${BRIDGE} ${1}
    /usr/sbin/ifconfig ${1} up
    
    #!/bin/sh
    ###########################################################
    # checkpsw.sh (C) 2004 Mathias Sundman <mathias@openvpn.se>
    #
    # This script will authenticate OpenVPN users against
    # a plain text file. The passfile should simply contain
    # one row per user with the username first followed by
    # one or more space(s) or tab(s) and then the password.
    
    PASSFILE="/home/openvpn/conf/server/psw-file"
    LOG_FILE="/var/log/openvpn-password.log"
    TIME_STAMP=`date "+%Y-%m-%d %T"`
    
    ###########################################################
    
    if [ ! -r "${PASSFILE}" ]; then
      echo "${TIME_STAMP}: Could not open password file \"${PASSFILE}\" for reading." >> ${LOG_FILE}
      exit 1
    fi
    
    CORRECT_PASSWORD=`awk '!/^;/&&!/^#/&&$1=="'${username}'"{print $2;exit}' ${PASSFILE}`
    
    if [ "${CORRECT_PASSWORD}" = "" ]; then 
      echo "${TIME_STAMP}: User does not exist: username=\"${username}\", password=\"${password}\"." >> ${LOG_FILE}
      exit 1
    fi
    
    if [ "${password}" = "${CORRECT_PASSWORD}" ]; then 
      echo "${TIME_STAMP}: Successful authentication: username=\"${username}\"." >> ${LOG_FILE}
      exit 0
    fi
    
    echo "${TIME_STAMP}: Incorrect password: username=\"${username}\", password=\"${password}\"." >> ${LOG_FILE}
    exit 1
    
    yydsOpenVPN,10.8.31.4
    
    yydsOpenVPN ABCabc123