1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tomato Username/Password Authentication

Discussion in 'Tomato Firmware' started by Lavas, Jun 13, 2012.

  1. Lavas

    Lavas Serious Server Member

    I am trying to set up a VPN with multiple users which ideally would all have a unique username/password combo that is set up solely in the tomato GUI.

    I've tried what has been suggested in this thread http://www.linksysinfo.org/index.php?threads/openvpn-username-password-authentication.32559/ and this one http://www.linksysinfo.org/index.php?threads/tomatovpn-and-auth-passwd.32480/ . Both fail to connect and are rejected. Here is the relevant information.

    Log File

     
  2. Lavas

    Lavas Serious Server Member

     
  3. Lavas

    Lavas Serious Server Member

    Script/init file
    Code:
    echo '#!/bin/sh
    pass=`awk "\\\$1 == \"${username}\" { print substr(\\\$0,length(\\\$1)+2) }" /tmp/openvpn-auth`
    test -n "$pass" && test "$pass" == "${password}" && exit 0
    exit 1' > /tmp/quickAuth.sh
    chmod 755 /tmp/quickAuth.sh
    echo '
    user1 pass1
    user2 pass2
    user3 pass3
    user4 pass4
    <etc>
    ' > /tmp/openvpn-auth
    Server Custom Configuration
    Code:
    script-security 3
    auth-user-pass-verify /tmp/openvpn-auth via-env
    Client Configuration
    Code:
    client
    dev tun
    tun-mtu 1400
    proto tcp-client
    remote XXX.XXX.XXX.XXX 1194
    auth-user-pass
    script-security 3
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    cipher BF-CBC 
    ca ca.crt
    cert client1.crt
    key client1.key
    ns-cert-type server
    verb 5
    Tomato is version 1.28. Any help at all would be greatly appreciated.
     
  4. dada124

    dada124 Serious Server Member

    Would it be difficult to add this to the GUI directly? It would be much more convenient...
     

Share This Page