免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 7599 | 回复: 15
打印 上一主题 下一主题

[FreeBSD] freebsd7+pppoe+radius+mysql的问题~~ [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-06 00:56 |只看该作者 |倒序浏览
pppoe服务器 mysql里面表radreply 里的Framed-IP-Address 指定一个固定ip的时候 客户端只能拨一次,第二次就拨不上了
客户端提示 629 连接被远程计算机终止,不指定ip就没事
radius配置文件
sql.conf:
#
#  Configuration for the SQL module, when using MySQL.
#
#  The database schema is available at:
#
#       doc/examples/mysql.sql
#
#  If you are using PostgreSQL, please use 'postgresql.conf', instead.
#  If you are using Oracle, please use 'oracle.conf', instead.
#  If you are using MS-SQL, please use 'mssql.conf', instead.
#
#  $Id: sql.conf,v 1.41.2.2.2.6 2007/07/17 08:35:34 pnixon Exp $
#
sql {
        # Database type
        # Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
        # rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
        driver = "rlm_sql_mysql"

        # Connect info
        server = "localhost"
        login = "root"
        password = "5903011"

        # Database table configuration
        radius_db = "radius"

        # If you want both stop and start records logged to the
        # same SQL table, leave this as is.  If you want them in
        # different tables, put the start table in acct_table1
        # and stop table in acct_table2
        acct_table1 = "radacct"
        acct_table2 = "radacct"

        # Allow for storing data after authentication
        postauth_table = "radpostauth"

        authcheck_table = "radcheck"
        authreply_table = "radreply"

        groupcheck_table = "radgroupcheck"
        groupreply_table = "radgroupreply"

        usergroup_table = "usergroup"

        # Table to keep radius client info
        nas_table = "nas"

        # Remove stale session if checkrad does not see a double login
        deletestalesessions = yes

        # Print all SQL statements when in debug mode (-x)
        sqltrace = no
        sqltracefile = ${logdir}/sqltrace.sql

        # number of sql connections to make to server
        num_sql_socks = 5

        # number of seconds to dely retrying on a failed database
        # connection (per_socket)
        connect_failure_retry_delay = 60

        # Safe characters list for sql queries. Everything else is replaced
        # with their mime-encoded equivalents.
        # The default list should be ok
        #safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"

        #######################################################################
        #  Query config:  Username
        #######################################################################
        # This is the username that will get substituted, escaped, and added
        # as attribute 'SQL-User-Name'.  '%{SQL-User-Name}' should be used below
        # everywhere a username substitution is needed so you you can be sure
        # the username passed from the client is escaped properly.
        #
        #  Uncomment the next line, if you want the sql_user_name to mean:
        #
        #    Use Stripped-User-Name, if it's there.
        #    Else use User-Name, if it's there,
        #    Else use hard-coded string "DEFAULT" as the user name.
        #sql_user_name = "%{Stripped-User-Name:-%{User-NameEFAULT}}"
        #
        sql_user_name = "%{User-Name}"

        #######################################################################
        #  Default profile
        #######################################################################
        # This is the default profile. It is found in SQL by group membership.
        # That means that this profile must be a member of at least one group
        # which will contain the corresponding check and reply items.
        # This profile will be queried in the authorize section for every user.
        # The point is to assign all users a default profile without having to
        # manually add each one to a group that will contain the profile.
        # The SQL module will also honor the User-Profile attribute. This
        # attribute can be set anywhere in the authorize section (ie the users
        # file). It is found exactly as the default profile is found.
        # If it is set then it will *overwrite* the default profile setting.
        # The idea is to select profiles based on checks on the incoming packets,
        # not on user group membership. For example:
        # -- users file --
        # DEFAULT       Service-Type == Outbound-User, User-Profile := "outbound"
        # DEFAULT       Service-Type == Framed-User, User-Profile := "framed"
        #
        # By default the default_user_profile is not set
        #
        #default_user_profile = "DEFAULT"
        #
        # Determines if we will query the default_user_profile or the User-Profile
        # if the user is not found. If the profile is found then we consider the user
        # found. By default this is set to 'no'.
        #
        #query_on_not_found = no

        #######################################################################
        #  Authorization Queries
        #######################################################################
        #  These queries compare the check items for the user
        #  in ${authcheck_table} and setup the reply items in
        #  ${authreply_table}.  You can use any query/tables
        #  you want, but the return data for each row MUST
        #  be in the  following order:
        #
        #  0. Row ID (currently unused)
        #  1. UserName/GroupName
        #  2. Item Attr Name
        #  3. Item Attr Value
        #  4. Item Attr Operation
        #######################################################################
        # Use these for case sensitive usernames.
#       authorize_check_query = "SELECT id, UserName, Attribute, Value, op \
#         FROM ${authcheck_table} \
#         WHERE Username = BINARY '%{SQL-User-Name}' \
#         ORDER BY id"
#       authorize_reply_query = "SELECT id, UserName, Attribute, Value, op \
#         FROM ${authreply_table} \
#         WHERE Username = BINARY '%{SQL-User-Name}' \
#         ORDER BY id"

        # The default queries are case insensitive. (for compatibility with
        # older versions of FreeRADIUS)
        authorize_check_query = "SELECT id, UserName, Attribute, Value, op \
          FROM ${authcheck_table} \
          WHERE Username = '%{SQL-User-Name}' and (mac='%{Calling-Station-Id}' \
          or isnull(mac) or mac='') ORDER BY id"
        authorize_reply_query = "SELECT id, UserName, Attribute, Value, op \
          FROM ${authreply_table} \
          WHERE Username = '%{SQL-User-Name}' \
          ORDER BY id"

        # Use these for case sensitive usernames.
#       authorize_group_check_query = "SELECT ${groupcheck_table}.id,${groupcheck_table}.GroupName,${groupcheck_table}.Attribute,${g
#       authorize_group_reply_query = "SELECT ${groupreply_table}.id,${groupreply_table}.GroupName,${groupreply_table}.Attribute,${g

        authorize_group_check_query = "SELECT ${groupcheck_table}.id,${groupcheck_table}.GroupName,${groupcheck_table}.Attribute,${g
        authorize_group_reply_query = "SELECT ${groupreply_table}.id,${groupreply_table}.GroupName,${groupreply_table}.Attribute,${g

        #######################################################################
        #  Accounting Queries
        #######################################################################
        # accounting_onoff_query        - query for Accounting On/Off packets
        # accounting_update_query       - query for Accounting update packets
        # accounting_update_query_alt   - query for Accounting update packets
        #                               (alternate in case first query fails)
        # accounting_start_query        - query for Accounting start packets
        # accounting_start_query_alt    - query for Accounting start packets
        #                               (alternate in case first query fails)
        # accounting_stop_query         - query for Accounting stop packets
        # accounting_stop_query_alt     - query for Accounting start packets
        #                               (alternate in case first query doesn't
        #                                affect any existing rows in the table)
        #######################################################################
        accounting_onoff_query = "UPDATE ${acct_table1} SET AcctStopTime='%S', AcctSessionTime=unix_timestamp('%S') - unix_timestamp

        accounting_update_query = " \
          UPDATE ${acct_table1} \
          SET \
             FramedIPAddress = '%{Framed-IP-Address}', \
             AcctSessionTime     = '%{Acct-Session-Time}', \
             AcctInputOctets     = '%{Acct-Input-Gigawords:-0}'  << 32 | \
                                   '%{Acct-Input-Octets:-0}', \
             AcctOutputOctets    = '%{Acct-Output-Gigawords:-0}' << 32 | \
                                   '%{Acct-Output-Octets:-0}' \
          WHERE AcctSessionId = '%{Acct-Session-Id}' \
          AND UserName        = '%{SQL-User-Name}' \
          AND NASIPAddress    = '%{NAS-IP-Address}'"


        accounting_update_query_alt = " \
          INSERT INTO ${acct_table1} \
            (AcctSessionId,    AcctUniqueId,      UserName, \
             Realm,            NASIPAddress,      NASPortId, \
             NASPortType,      AcctStartTime,     AcctSessionTime, \
             AcctAuthentic,    ConnectInfo_start, AcctInputOctets, \
             AcctOutputOctets, CalledStationId,   CallingStationId, \
             ServiceType,      FramedProtocol,    FramedIPAddress, \
             AcctStartDelay,   XAscendSessionSvrKey) \
          VALUES \
            ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \
             '%{SQL-User-Name}', \
             '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
             '%{NAS-Port-Type}', \
             DATE_SUB('%S', \
                      INTERVAL (%{Acct-Session-Time:-0} + \
                                %{Acct-Delay-Time:-0}) SECOND), \
                      '%{Acct-Session-Time}', \
             '%{Acct-Authentic}', '', \
             '%{Acct-Input-Gigawords:-0}' << 32 | \
             '%{Acct-Input-Octets:-0}', \
             '%{Acct-Output-Gigawords:-0}' << 32 | \
             '%{Acct-Output-Octets:-0}', \
             '%{Called-Station-Id}', '%{Calling-Station-Id}', \
             '%{Service-Type}', '%{Framed-Protocol}', \
             '%{Framed-IP-Address}', \
             '0', '%{X-Ascend-Session-Svr-Key}')"


        accounting_start_query = " \
          INSERT INTO ${acct_table1} \
            (AcctSessionId,    AcctUniqueId,     UserName, \
             Realm,            NASIPAddress,     NASPortId, \
             NASPortType,      AcctStartTime,    AcctStopTime, \
             AcctSessionTime,  AcctAuthentic,    ConnectInfo_start, \
             ConnectInfo_stop, AcctInputOctets,  AcctOutputOctets, \
             CalledStationId,  CallingStationId, AcctTerminateCause, \
             ServiceType,      FramedProtocol,   FramedIPAddress, \
             AcctStartDelay,   AcctStopDelay,    XAscendSessionSvrKey) \
          VALUES \
            ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \
             '%{SQL-User-Name}', \
             '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
             '%{NAS-Port-Type}', '%S', '0', \
             '0', '%{Acct-Authentic}', '%{Connect-Info}', \
             '', '0', '0', \
             '%{Called-Station-Id}', '%{Calling-Station-Id}', '', \
             '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
             '%{Acct-Delay-Time:-0}', '0', '%{X-Ascend-Session-Svr-Key}')"

        accounting_start_query_alt  = "UPDATE ${acct_table1} SET AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', Connec


        accounting_stop_query = " \
          UPDATE ${acct_table2} SET \
             AcctStopTime       = '%S', \
             AcctSessionTime    = '%{Acct-Session-Time}', \
             AcctInputOctets    = '%{Acct-Input-Gigawords:-0}' << 32 | \
                                  '%{Acct-Input-Octets:-0}', \
             AcctOutputOctets   = '%{Acct-Output-Gigawords:-0}' << 32 | \
                                  '%{Acct-Output-Octets:-0}', \
             AcctTerminateCause = '%{Acct-Terminate-Cause}', \
             AcctStopDelay      = '%{Acct-Delay-Time:-0}', \
             ConnectInfo_stop   = '%{Connect-Info}' \
          WHERE AcctSessionId   = '%{Acct-Session-Id}' \
          AND UserName          = '%{SQL-User-Name}' \
          AND NASIPAddress      = '%{NAS-IP-Address}'"


        accounting_stop_query_alt = " \
          INSERT INTO ${acct_table2} \
            (AcctSessionId, AcctUniqueId, UserName, \
             Realm, NASIPAddress, NASPortId, \
             NASPortType, AcctStartTime, AcctStopTime, \
             AcctSessionTime, AcctAuthentic, ConnectInfo_start, \
             ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, \
             CalledStationId, CallingStationId, AcctTerminateCause, \
             ServiceType, FramedProtocol, FramedIPAddress, \
             AcctStartDelay, AcctStopDelay) \
          VALUES \
            ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \
             '%{SQL-User-Name}', \
             '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
             '%{NAS-Port-Type}', \
             DATE_SUB('%S', \
                 INTERVAL (%{Acct-Session-Time:-0} + \
                 %{Acct-Delay-Time:-0}) SECOND), \
             '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', \
             '%{Connect-Info}', \
             '%{Acct-Input-Gigawords:-0}' << 32 | \
             '%{Acct-Input-Octets:-0}', \
             '%{Acct-Output-Gigawords:-0}' << 32 | \
             '%{Acct-Output-Octets:-0}', \
             '%{Called-Station-Id}', '%{Calling-Station-Id}', \
             '%{Acct-Terminate-Cause}', \
             '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
             '0', '%{Acct-Delay-Time:-0}')"


        #######################################################################
        # Simultaneous Use Checking Queries
        #######################################################################
        # simul_count_query     - query for the number of current connections
        #                       - If this is not defined, no simultaneouls use checking
        #                       - will be performed by this module instance
        # simul_verify_query    - query to return details of current connections for verification
        #                       - Leave blank or commented out to disable verification step
        #                       - Note that the returned field order should not be changed.
        #######################################################################
^[ (escape) menu  ^y search prompt  ^k delete line   ^p prev li   ^g prev page
^o ascii code     ^x search         ^l undelete line ^n next li   ^v next page
^u end of file    ^a begin of line  ^w delete word   ^b back 1 char
^t begin of file  ^e end of line    ^r restore word  ^f forward 1 char
^c command        ^d delete char    ^j undelete char ^z next word
L: 330 C: 1 ===================================================================

        # Uncomment simul_count_query to enable simultaneous use checking
        #simul_count_query = "SELECT COUNT(*) \
                             #FROM ${acct_table1} \
                             #WHERE UserName='%{SQL-User-Name}' \
                             #AND AcctStopTime = 0"

        simul_verify_query  = "SELECT RadAcctId, AcctSessionId, UserName, \
                               NASIPAddress, NASPortId, FramedIPAddress, \
                               CallingStationId, FramedProtocol \
                               FROM ${acct_table1} \
                               WHERE UserName='%{SQL-User-Name}' \
                               AND AcctStopTime = 0"

        #######################################################################
        # Group Membership Queries
        #######################################################################
        # group_membership_query        - Check user group membership
        #######################################################################

        group_membership_query = "SELECT GroupName FROM ${usergroup_table} WHERE UserName='%{SQL-User-Name}'"

        #######################################################################
        # Authentication Logging Queries
        #######################################################################
        # postauth_query                - Insert some info after authentication
        #######################################################################

        #postauth_query = "INSERT into ${postauth_table} (user, pass, reply, date) values ('%{User-Name}', '%{User-Password:-Chap-Pa
        postauth_query = "UPDATE ${authcheck_table} set mac='%{Calling-Station-Id}' WHERE Username = '%{SQL-User-Name}' and (mac=''
        #
        # Set to 'yes' to read radius clients from the database ('nas' table)
        #readclients = yes
}


users:

#
radiusd.rar (20.85 KB, 下载次数: 45)

论坛徽章:
0
2 [报告]
发表于 2008-11-06 00:58 |只看该作者

回复 #1 zzm183 的帖子

#       Please read the documentation file ../doc/processing_users_file,
#       or 'man 5 users' (after installing the server) for more information.
#
#       As of 1.1.4, you SHOULD NOT use Auth-Type.  See "man rlm_pap"
#       for a much better way of dealing with differing passwords.
#       If you set Auth-Type, SOME AUTHENTICATION METHODS WILL NOT WORK.
#       If you don't set Auth-Type, the server will figure out what to do,
#       and will almost always do the right thing.
#
#       This file contains authentication security and configuration
#       information for each user.  Accounting requests are NOT processed
#       through this file.  Instead, see 'acct_users', in this directory.
#
#       The first field is the user's name and can be up to
#       253 characters in length.  This is followed (on the same line) with
#       the list of authentication requirements for that user.  This can
#       include password, comm server name, comm server port number, protocol
#       type (perhaps set by the "hints" file), and huntgroup name (set by
#       the "huntgroups" file).
#
#       Indented (with the tab character) lines following the first
#       line indicate the configuration values to be passed back to
#       the comm server to allow the initiation of a user session.
#       This can include things like the PPP configuration values
#       or the host to log the user onto.
#
#       If you are not sure why a particular reply is being sent by the
#       server, then run the server in debugging mode (radiusd -X), and
#       you will see which entries in this file are matched.
#
#       When an authentication request is received from the comm server,
#       these values are tested. Only the first match is used unless the
#       "Fall-Through" variable is set to "Yes".
#
#       A special user named "DEFAULT" matches on all usernames.
#       You can have several DEFAULT entries. All entries are processed
#       in the order they appear in this file. The first entry that
#       matches the login-request will stop processing unless you use
#       the Fall-Through variable.
#
#       You can include another `users' file with `$INCLUDE users.other'
#

#
#       For a list of RADIUS attributes, and links to their definitions,
#       see:
#
#       http://www.freeradius.org/rfc/attributes.html
#

#
# Deny access for a specific user.  Note that this entry MUST
# be before any other 'Auth-Type' attribute which results in the user
# being authenticated.
#
# Note that there is NO 'Fall-Through' attribute, so the user will not
# be given any additional resources.
#
#lameuser       Auth-Type := Reject
#               Reply-Message = "Your account has been disabled."

#
# Deny access for a group of users.
#
# Note that there is NO 'Fall-Through' attribute, so the user will not
# be given any additional resources.
#
#DEFAULT        Group == "disabled", Auth-Type := Reject
#               Reply-Message = "Your account has been disabled."
#

#
# This is a complete entry for "steve". Note that there is no Fall-Through
# entry so that no DEFAULT entry will be used, and the user will NOT
# get any attributes in addition to the ones listed here.
#
#steve  Cleartext-Password := "testing"
#       Service-Type = Framed-User,
#       Framed-Protocol = PPP,
#       Framed-IP-Address = 172.16.3.33,
#       Framed-IP-Netmask = 255.255.255.0,
#       Framed-Routing = Broadcast-Listen,
#       Framed-Filter-Id = "std.ppp",
#       Framed-MTU = 1500,
#       Framed-Compression = Van-Jacobsen-TCP-IP

#
# This is an entry for a user with a space in their name.
# Note the double quotes surrounding the name.
#
#"John Doe"     Cleartext-Password := "hello"
#               Reply-Message = "Hello, %u"

#
# Dial user back and telnet to the default host for that port
#
#Deg    Cleartext-Password := "ge55ged"
#       Service-Type = Callback-Login-User,
#       Login-IP-Host = 0.0.0.0,
#       Callback-Number = "9,5551212",
#       Login-Service = Telnet,
#       Login-TCP-Port = Telnet

#
# Another complete entry. After the user "dialbk" has logged in, the
# connection will be broken and the user will be dialed back after which
# he will get a connection to the host "timeshare1".
#
#dialbk Cleartext-Password := "callme"
#       Service-Type = Callback-Login-User,
#       Login-IP-Host = timeshare1,
#       Login-Service = PortMaster,
#       Callback-Number = "9,1-800-555-1212"

#
# user "swilson" will only get a static IP number if he logs in with
# a framed protocol on a terminal server in Alphen (see the huntgroups file).
#
# Note that by setting "Fall-Through", other attributes will be added from
# the following DEFAULT entries
#
#swilson        Service-Type == Framed-User, Huntgroup-Name == "alphen"
#               Framed-IP-Address = 192.168.1.65,
#               Fall-Through = Yes

#
# If the user logs in as 'username.shell', then authenticate them
# against the system database, give them shell access, and stop processing
# the rest of the file.
#
# Note that authenticating against an /etc/passwd file works ONLY for PAP,
# and not for CHAP, MS-CHAP, or EAP.
#
#DEFAULT        Suffix == ".shell", Auth-Type := System
#               Service-Type = Login-User,
#               Login-Service = Telnet,
#               Login-IP-Host = your.shell.machine


#
# The rest of this file contains the several DEFAULT entries.
# DEFAULT entries match with all login names.
# Note that DEFAULT entries can also Fall-Through (see first entry).
# A name-value pair from a DEFAULT entry will _NEVER_ override
# an already existing name-value pair.
#

#
# First setup all accounts to be checked against the UNIX /etc/passwd.
# (Unless a password was already given earlier in this file).
#
DEFAULT Auth-Type = Local
        Fall-Through = 1

#
# Set up different IP address pools for the terminal servers.
# Note that the "+" behind the IP address means that this is the "base"
# IP address. The Port-Id (S0, S1 etc) will be added to it.
#
#DEFAULT        Service-Type == Framed-User, Huntgroup-Name == "alphen"
#               Framed-IP-Address = 192.168.1.32+,
#               Fall-Through = Yes

#DEFAULT        Service-Type == Framed-User, Huntgroup-Name == "delft"
#               Framed-IP-Address = 192.168.2.32+,
#               Fall-Through = Yes

#
# Defaults for all framed connections.
#
DEFAULT Service-Type == Framed-User
        Framed-IP-Address = 255.255.255.254,
        Framed-MTU = 576,
        Service-Type = Framed-User,
        Fall-Through = Yes

#
# Default for PPP: dynamic IP address, PPP mode, VJ-compression.
# NOTE: we do not use Hint = "PPP", since PPP might also be auto-detected
#       by the terminal server in which case there may not be a "P" suffix.
^[ (escape) menu  ^y search prompt  ^k delete line   ^p prev li   ^g prev page
^o ascii code     ^x search         ^l undelete line ^n next li   ^v next page
^u end of file    ^a begin of line  ^w delete word   ^b back 1 char
^t begin of file  ^e end of line    ^r restore word  ^f forward 1 char
^c command        ^d delete char    ^j undelete char ^z next word
L: 215 C: 1 ===================================================================
#       The terminal server sends "Framed-Protocol = PPP" for auto PPP.
#
DEFAULT Framed-Protocol == PPP
        Framed-Protocol = PPP,
        Framed-Compression = Van-Jacobson-TCP-IP

#
# Default for CSLIP: dynamic IP address, SLIP mode, VJ-compression.
#
DEFAULT Hint == "CSLIP"
        Framed-Protocol = SLIP,
        Framed-Compression = Van-Jacobson-TCP-IP

#
# Default for SLIP: dynamic IP address, SLIP mode.
#
DEFAULT Hint == "SLIP"
        Framed-Protocol = SLIP

#
# Last default: rlogin to our main server.
#
#DEFAULT
#       Service-Type = Login-User,
#       Login-Service = Rlogin,
#       Login-IP-Host = shellbox.ispdomain.com

# #
# # Last default: shell on the local terminal server.
# #
# DEFAULT
#       Service-Type = Shell-User

# On no match, the user is denied access.


请帮忙看下什么问题~~~

论坛徽章:
0
3 [报告]
发表于 2008-11-06 00:59 |只看该作者

回复 #1 zzm183 的帖子

tail -f /var/log/ppp.log
结果
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: Using interface: tun0
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: Created in closed state
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: PPP Started (direct mode).
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: bundle: Establish
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: closed -> opening
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: Link is a netgraph node
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: Connected!
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: opening -> carrier
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: carrier -> lcp
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: bundle: Authenticate
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: his = none, mine = CHAP 0x05
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: Chap Output: CHALLENGE
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: Chap Input: RESPONSE (16 bytes from zzm18
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: Radius: Request sent
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: Radius(auth): ACCEPT received
Nov  6 00:29:02 ROUTE ppp[1324]: Phase:  IP 255.255.255.254
Nov  6 00:29:02 ROUTE ppp[1324]: Phase:  MTU 576
Nov  6 00:29:02 ROUTE ppp[1324]: Phase:  VJ enabled
Nov  6 00:29:02 ROUTE ppp[1324]: Phase:  IP 192.168.6.101
Nov  6 00:29:02 ROUTE ppp[1324]: Phase:  Netmask 255.255.255.0
Nov  6 00:29:02 ROUTE ppp[1324]: Phase:  MTU 1492
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: Chap Output: SUCCESS
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: lcp -> open
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: bundle: Network
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: IPV6CP protocol reject closes IPV6CP !
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: IPV6CP protocol reject closes IPV6CP !
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:02 ROUTE ppp[1324]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: Radius(acct): STOP data sent
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: read (0): Got zero bytes
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: open -> lcp
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: bundle: Terminate
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: Disconnected!
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: Connect time: 0 secs: 402 octets in, 285 octets out
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: 19 packets in, 17 packets out
Nov  6 00:29:02 ROUTE ppp[1324]: Phase:  total 687 bytes/sec, peak 0 bytes/sec on Thu Nov  6 00:29:02 2008
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: deflink: lcp -> closed
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: bundle: Dead
Nov  6 00:29:02 ROUTE ppp[1324]: Phase: PPP Terminated (normal).
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: Using interface: tun0
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: Created in closed state
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: PPP Started (direct mode).
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: bundle: Establish
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: closed -> opening
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: Link is a netgraph node
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: Connected!
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: opening -> carrier
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: carrier -> lcp
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: bundle: Authenticate
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: his = none, mine = CHAP 0x05
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: Chap Output: CHALLENGE
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: Chap Input: RESPONSE (16 bytes from zzm18
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: Radius: Request sent
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: Radius(auth): ACCEPT received
Nov  6 00:29:05 ROUTE ppp[1326]: Phase:  IP 255.255.255.254
Nov  6 00:29:05 ROUTE ppp[1326]: Phase:  MTU 576
Nov  6 00:29:05 ROUTE ppp[1326]: Phase:  VJ enabled
Nov  6 00:29:05 ROUTE ppp[1326]: Phase:  IP 192.168.6.101
Nov  6 00:29:05 ROUTE ppp[1326]: Phase:  Netmask 255.255.255.0
Nov  6 00:29:05 ROUTE ppp[1326]: Phase:  MTU 1492
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: Chap Output: SUCCESS
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: lcp -> open
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: bundle: Network
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: IPV6CP protocol reject closes IPV6CP !
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: IPV6CP protocol reject closes IPV6CP !
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:05 ROUTE ppp[1326]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: Radius(acct): STOP data sent
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: read (0): Got zero bytes
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: open -> lcp
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: bundle: Terminate
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: Disconnected!
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: Connect time: 0 secs: 732 octets in, 285 octets out
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: 20 packets in, 17 packets out
Nov  6 00:29:05 ROUTE ppp[1326]: Phase:  total 1017 bytes/sec, peak 0 bytes/sec on Thu Nov  6 00:29:05 2008
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: deflink: lcp -> closed
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: bundle: Dead
Nov  6 00:29:05 ROUTE ppp[1326]: Phase: PPP Terminated (normal).
ppp.conf
#default:
#  set log phase ipcp lcp
pppoe:
#  set timeout 0
  set device PPPoE:le1
  allow mode direct
  set mru 1492
  set mtu 1492
#  set speed sync
  enable lqr
#  set lqrperiod 60
#  enable chap
  enable chap pap passwdauth
  enable MSChapv2
  allow MSChapv2
  enable MSChap
  allow MSChap
#  set cd 5
  accept dns
  set radius /etc/radius.conf
  set ifaddr 172.16.0.1 192.168.50.1-192.168.50.254

论坛徽章:
0
4 [报告]
发表于 2008-11-06 01:02 |只看该作者
系统错误提示
tail -50 /var/log/messages

Nov  6 00:37:28 ROUTE ppp[1371]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:37:28 ROUTE ppp[1371]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:37:28 ROUTE ppp[1371]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:37:28 ROUTE ppp[1371]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:37:31 ROUTE ppp[1373]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
ROUTE# tail -50 /var/log/messages
Nov  6 00:25:10 ROUTE ppp[1315]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:25:10 ROUTE ppp[1315]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:25:10 ROUTE ppp[1315]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:25:10 ROUTE ppp[1315]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:25:10 ROUTE ppp[1315]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:25:10 ROUTE ppp[1315]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:25:38 ROUTE ppp[1317]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:25:39 ROUTE ppp[1317]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:25:39 ROUTE ppp[1317]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:25:39 ROUTE ppp[1317]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:25:39 ROUTE ppp[1317]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:27:16 ROUTE kernel: arp: 192.168.10.60 is on le0 but got reply from 00:0b:6a:e2:6a:3e on le1
Nov  6 00:27:16 ROUTE ppp[1319]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:27:16 ROUTE ppp[1319]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:27:16 ROUTE ppp[1319]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:27:16 ROUTE ppp[1319]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:27:17 ROUTE ppp[1319]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:27:18 ROUTE kernel: arp: 192.168.10.2 is on le0 but got reply from 00:19:e0:c4:14:56 on le1
Nov  6 00:27:48 ROUTE ppp[1321]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:27:48 ROUTE ppp[1321]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:27:48 ROUTE ppp[1321]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:27:48 ROUTE ppp[1321]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:27:48 ROUTE ppp[1321]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:28:54 ROUTE kernel: arp: 192.168.10.60 is on le0 but got reply from 00:0b:6a:e2:6a:3e on le1
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:02 ROUTE ppp[1324]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:29:02 ROUTE ppp[1324]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:29:05 ROUTE ppp[1326]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:29:05 ROUTE ppp[1326]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:32:31 ROUTE kernel: arp: 192.168.10.60 is on le0 but got reply from 00:0b:6a:e2:6a:3e on le1
Nov  6 00:32:45 ROUTE kernel: arp: 192.168.10.2 is on le0 but got reply from 00:19:e0:c4:14:56 on le1
Nov  6 00:35:11 ROUTE kernel: arp: 192.168.10.2 is on le0 but got reply from 00:19:e0:c4:14:56 on le1
Nov  6 00:37:20 ROUTE kernel: arp: 192.168.10.60 is on le0 but got reply from 00:0b:6a:e2:6a:3e on le1
Nov  6 00:37:28 ROUTE ppp[1371]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:37:28 ROUTE ppp[1371]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:37:28 ROUTE ppp[1371]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:37:28 ROUTE ppp[1371]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:37:28 ROUTE ppp[1371]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: iface add: ioctl(SIOCAIFADDR, 172.16.0.1 -> 192.168.6.101): File exists
Nov  6 00:37:31 ROUTE ppp[1373]: Error: ipcp_InterfaceUp: unable to set ip address
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: ipv4_Input: IPCP not open - packet dropped
Nov  6 00:37:31 ROUTE ppp[1373]: Warning: ff02:7::/32: Change route failed: errno: Network is unreachable
ROUTE#

论坛徽章:
0
5 [报告]
发表于 2008-11-06 09:10 |只看该作者
顶上~~~~~~没人回答么。。。。。。。

论坛徽章:
0
6 [报告]
发表于 2008-11-06 10:19 |只看该作者
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

论坛徽章:
0
7 [报告]
发表于 2008-11-06 16:35 |只看该作者
失望中,,,,,,,,再顶!!!!

论坛徽章:
0
8 [报告]
发表于 2008-11-06 17:38 |只看该作者
大哥这么长的E文
帮顶

论坛徽章:
0
9 [报告]
发表于 2008-11-06 22:59 |只看该作者
再帖下radius的debug
rad_recv: Access-Request packet from host 127.0.0.1:60275, id=48, length=128
        User-Name = "zzm188"
        Service-Type = Framed-User
        Framed-Protocol = PPP
        CHAP-Password = 0x0159a1d17d79955044f8d0baf3c2e63b49
        CHAP-Challenge = 0x31393538343630343033363530333539
        NAS-IP-Address = 192.168.10.50
        NAS-Identifier = "ROUTE.hjsj.com"
        Calling-Station-Id = "0:b:6a:e2:6a:3e"
        NAS-Port-Type = Ethernet
        NAS-Port = 20
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 6
  modcall[authorize]: module "preprocess" returns ok for request 6
  rlm_chap: Setting 'Auth-Type := CHAP'
  modcall[authorize]: module "chap" returns ok for request 6
  modcall[authorize]: module "mschap" returns noop for request 6
    rlm_realm: No '@' in User-Name = "zzm188", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 6
  rlm_eap: No EAP-Message, not doing EAP
  modcall[authorize]: module "eap" returns noop for request 6
    users: Matched entry DEFAULT at line 153
    users: Matched entry DEFAULT at line 172
    users: Matched entry DEFAULT at line 184
  modcall[authorize]: module "files" returns ok for request 6
radius_xlat:  'zzm188'
rlm_sql (sql): sql_set_user escaped user --> 'zzm188'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM radcheck           WHERE Username = 'zzm188' and (mac='0:b:6a:e2:6a:3e'           or isnull(mac) or mac='') ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 0
radius_xlat:  'SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE usergroup.Username = 'zzm188' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM radreply           WHERE Username = 'zzm188'           ORDER BY id'
radius_xlat:  'SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE usergroup.Username = 'zzm188' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql (sql): Released sql socket id: 0
  modcall[authorize]: module "sql" returns ok for request 6
rlm_pap: Found existing Auth-Type, not changing it.
  modcall[authorize]: module "pap" returns noop for request 6
modcall: leaving group authorize (returns ok) for request 6
  rad_check_password:  Found Auth-Type CHAP
auth: type "CHAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group CHAP for request 6
  rlm_chap: login attempt by "zzm188" with CHAP password
  rlm_chap: Using clear text password "5903011" for user zzm188 authentication.
  rlm_chap: chap user zzm188 authenticated succesfully
  modcall[authenticate]: module "chap" returns ok for request 6
modcall: leaving group CHAP (returns ok) for request 6
  Processing the post-auth section of radiusd.conf
modcall: entering group post-auth for request 6
rlm_sql (sql): Processing sql_postauth
radius_xlat:  'zzm188'
rlm_sql (sql): sql_set_user escaped user --> 'zzm188'
radius_xlat:  'UPDATE radcheck set mac='0:b:6a:e2:6a:3e' WHERE Username = 'zzm188' and (mac='' or isnull(mac))'
rlm_sql (sql) in sql_postauth: query is UPDATE radcheck set mac='0:b:6a:e2:6a:3e' WHERE Username = 'zzm188' and (mac='' or isnull(mac))
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql (sql): Released sql socket id: 4
  modcall[post-auth]: module "sql" returns ok for request 6
modcall: leaving group post-auth (returns ok) for request 6
Sending Access-Accept of id 48 to 127.0.0.1 port 60275
        Framed-IP-Address = 255.255.255.254
        Framed-MTU = 576
        Service-Type := Framed-User
        Framed-Protocol = PPP
        Framed-Compression = Van-Jacobson-TCP-IP
        Framed-IP-Address == 192.168.6.101
        Framed-IP-Netmask == 255.255.255.0
        Framed-MTU == 1492
Finished request 6
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Accounting-Request packet from host 127.0.0.1:55114, id=7, length=143
        User-Name = ""
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Calling-Station-Id = "0:b:6a:e2:6a:3e"
        NAS-IP-Address = 192.168.10.50
        NAS-Identifier = "ROUTE.hjsj.com"
        NAS-Port-Type = Ethernet
        NAS-Port = 20
        Acct-Status-Type = Stop
        Acct-Session-Id = ""
        Acct-Multi-Session-Id = ""
        Acct-Delay-Time = 0
        Acct-Input-Octets = 0
        Acct-Input-Gigawords = 0
        Acct-Input-Packets = 0
        Acct-Output-Octets = 0
        Acct-Output-Gigawords = 0
        Acct-Output-Packets = 0
        Acct-Session-Time = 0
  Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 7
  modcall[preacct]: module "preprocess" returns noop for request 7
rlm_acct_unique: Hashing 'NAS-Port = 20,Client-IP-Address = 127.0.0.1,NAS-IP-Address = 192.168.10.50,Acct-Session-Id = "",User-Name = ""'
rlm_acct_unique: Acct-Unique-Session-ID = "65dbc601f2bf7fb8".
  modcall[preacct]: module "acct_unique" returns ok for request 7
    rlm_realm: No '@' in User-Name = "", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[preacct]: module "suffix" returns noop for request 7
  modcall[preacct]: module "files" returns noop for request 7
modcall: leaving group preacct (returns ok) for request 7
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 7
radius_xlat:  '/var/log/radacct/127.0.0.1/detail-20081106'
rlm_detail: /var/log/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/radacct/127.0.0.1/detail-20081106
  modcall[accounting]: module "detail" returns ok for request 7
  modcall[accounting]: module "unix" returns ok for request 7
radius_xlat:  '/var/log/radutmp'
radius_xlat:  ''
rlm_radutmp: Logout for NAS 192.168.10.50 port 20, but no Login record
  modcall[accounting]: module "radutmp" returns ok for request 7
radius_xlat:  ''
radius_xlat:  '           UPDATE radacct SET              AcctStopTime       = '2008-11-06 21:11:56',              AcctSessionTime    = '0',              AcctInputOctets    = '0' << 32 |                                   '0',              AcctOutputOctets   = '0' << 32 |                                   '0',              AcctTerminateCause = '',              AcctStopDelay      = '0',              ConnectInfo_stop   = ''           WHERE AcctSessionId   = ''           AND UserName          = ''           AND NASIPAddress      = '192.168.10.50''
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): Released sql socket id: 3
  modcall[accounting]: module "sql" returns ok for request 7
modcall: leaving group accounting (returns ok) for request 7
Sending Accounting-Response of id 7 to 127.0.0.1 port 55114
Finished request 7
Going to the next request
Waking up in 6 seconds...
rad_recv: Access-Request packet from host 127.0.0.1:54564, id=217, length=128
        User-Name = "zzm188"
        Service-Type = Framed-User
        Framed-Protocol = PPP
        CHAP-Password = 0x016d9a025123d2c770c84d05df4edf9fdd
        CHAP-Challenge = 0x34343236343737333232323238353839
        NAS-IP-Address = 192.168.10.50
        NAS-Identifier = "ROUTE.hjsj.com"
        Calling-Station-Id = "0:b:6a:e2:6a:3e"
        NAS-Port-Type = Ethernet
        NAS-Port = 21
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 8
  modcall[authorize]: module "preprocess" returns ok for request 8
  rlm_chap: Setting 'Auth-Type := CHAP'
  modcall[authorize]: module "chap" returns ok for request 8
  modcall[authorize]: module "mschap" returns noop for request 8
    rlm_realm: No '@' in User-Name = "zzm188", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 8
  rlm_eap: No EAP-Message, not doing EAP
  modcall[authorize]: module "eap" returns noop for request 8
    users: Matched entry DEFAULT at line 153
    users: Matched entry DEFAULT at line 172
    users: Matched entry DEFAULT at line 184
  modcall[authorize]: module "files" returns ok for request 8
radius_xlat:  'zzm188'
rlm_sql (sql): sql_set_user escaped user --> 'zzm188'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM radcheck           WHERE Username = 'zzm188' and (mac='0:b:6a:e2:6a:3e'           or isnull(mac) or mac='') ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 2
radius_xlat:  'SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE usergroup.Username = 'zzm188' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM radreply           WHERE Username = 'zzm188'           ORDER BY id'
radius_xlat:  'SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE usergroup.Username = 'zzm188' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql (sql): Released sql socket id: 2
  modcall[authorize]: module "sql" returns ok for request 8
rlm_pap: Found existing Auth-Type, not changing it.
  modcall[authorize]: module "pap" returns noop for request 8
modcall: leaving group authorize (returns ok) for request 8
  rad_check_password:  Found Auth-Type CHAP
auth: type "CHAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group CHAP for request 8
  rlm_chap: login attempt by "zzm188" with CHAP password
  rlm_chap: Using clear text password "5903011" for user zzm188 authentication.
  rlm_chap: chap user zzm188 authenticated succesfully
  modcall[authenticate]: module "chap" returns ok for request 8
modcall: leaving group CHAP (returns ok) for request 8
  Processing the post-auth section of radiusd.conf
modcall: entering group post-auth for request 8
rlm_sql (sql): Processing sql_postauth
radius_xlat:  'zzm188'
rlm_sql (sql): sql_set_user escaped user --> 'zzm188'
radius_xlat:  'UPDATE radcheck set mac='0:b:6a:e2:6a:3e' WHERE Username = 'zzm188' and (mac='' or isnull(mac))'
rlm_sql (sql) in sql_postauth: query is UPDATE radcheck set mac='0:b:6a:e2:6a:3e' WHERE Username = 'zzm188' and (mac='' or isnull(mac))
rlm_sql (sql): Reserving sql socket id: 1
rlm_sql (sql): Released sql socket id: 1
  modcall[post-auth]: module "sql" returns ok for request 8
modcall: leaving group post-auth (returns ok) for request 8
Sending Access-Accept of id 217 to 127.0.0.1 port 54564
        Framed-IP-Address = 255.255.255.254
        Framed-MTU = 576
        Service-Type := Framed-User
        Framed-Protocol = PPP
        Framed-Compression = Van-Jacobson-TCP-IP
        Framed-IP-Address == 192.168.6.101
        Framed-IP-Netmask == 255.255.255.0
        Framed-MTU == 1492
Finished request 8
Going to the next request
--- Walking the entire request list ---
Waking up in 3 seconds...
rad_recv: Accounting-Request packet from host 127.0.0.1:58194, id=100, length=143
        User-Name = ""
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Calling-Station-Id = "0:b:6a:e2:6a:3e"
        NAS-IP-Address = 192.168.10.50
        NAS-Identifier = "ROUTE.hjsj.com"
        NAS-Port-Type = Ethernet
        NAS-Port = 21
        Acct-Status-Type = Stop
        Acct-Session-Id = ""
        Acct-Multi-Session-Id = ""
        Acct-Delay-Time = 0
        Acct-Input-Octets = 0
        Acct-Input-Gigawords = 0
        Acct-Input-Packets = 0
        Acct-Output-Octets = 0
        Acct-Output-Gigawords = 0
        Acct-Output-Packets = 0
        Acct-Session-Time = 0
  Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 9
  modcall[preacct]: module "preprocess" returns noop for request 9
rlm_acct_unique: Hashing 'NAS-Port = 21,Client-IP-Address = 127.0.0.1,NAS-IP-Address = 192.168.10.50,Acct-Session-Id = "",User-Name = ""'
rlm_acct_unique: Acct-Unique-Session-ID = "526bdaeb8b5d9a5d".
  modcall[preacct]: module "acct_unique" returns ok for request 9
    rlm_realm: No '@' in User-Name = "", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[preacct]: module "suffix" returns noop for request 9
  modcall[preacct]: module "files" returns noop for request 9
modcall: leaving group preacct (returns ok) for request 9
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 9
radius_xlat:  '/var/log/radacct/127.0.0.1/detail-20081106'
rlm_detail: /var/log/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/radacct/127.0.0.1/detail-20081106
  modcall[accounting]: module "detail" returns ok for request 9
  modcall[accounting]: module "unix" returns ok for request 9
radius_xlat:  '/var/log/radutmp'
radius_xlat:  ''
rlm_radutmp: Logout for NAS 192.168.10.50 port 21, but no Login record
  modcall[accounting]: module "radutmp" returns ok for request 9
radius_xlat:  ''
radius_xlat:  '           UPDATE radacct SET              AcctStopTime       = '2008-11-06 21:11:59',              AcctSessionTime    = '0',              AcctInputOctets    = '0' << 32 |                                   '0',              AcctOutputOctets   = '0' << 32 |                                   '0',              AcctTerminateCause = '',              AcctStopDelay      = '0',              ConnectInfo_stop   = ''           WHERE AcctSessionId   = ''           AND UserName          = ''           AND NASIPAddress      = '192.168.10.50''
rlm_sql (sql): Reserving sql socket id: 0
rlm_sql (sql): Released sql socket id: 0
  modcall[accounting]: module "sql" returns ok for request 9
modcall: leaving group accounting (returns ok) for request 9
Sending Accounting-Response of id 100 to 127.0.0.1 port 58194
Finished request 9
Going to the next request
Waking up in 3 seconds...
--- Walking the entire request list ---
Cleaning up request 7 ID 7 with timestamp 4912ed1c
Cleaning up request 6 ID 48 with timestamp 4912ed1c
Waking up in 3 seconds...
--- Walking the entire request list ---
Cleaning up request 9 ID 100 with timestamp 4912ed1f
Cleaning up request 8 ID 217 with timestamp 4912ed1f
Nothing to do.  Sleeping until we see a request.

论坛徽章:
0
10 [报告]
发表于 2008-11-06 23:08 |只看该作者

回复 #1 zzm183 的帖子

这是另外一个帐号radius的debug,没设置固定ip的,可以成功拨上
获取的ip是ppp.conf里面设置的pool里的地址
rad_recv: Access-Request packet from host 127.0.0.1:65420, id=85, length=128
        User-Name = "zzm183"
        Service-Type = Framed-User
        Framed-Protocol = PPP
        CHAP-Password = 0x0111a2f3d9e669758fe13d9d0a39006e9a
        CHAP-Challenge = 0x37373831323634333139353634323932
        NAS-IP-Address = 192.168.10.50
        NAS-Identifier = "ROUTE.hjsj.com"
        Calling-Station-Id = "0:b:6a:e2:6a:3e"
        NAS-Port-Type = Ethernet
        NAS-Port = 22
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 10
  modcall[authorize]: module "preprocess" returns ok for request 10
  rlm_chap: Setting 'Auth-Type := CHAP'
  modcall[authorize]: module "chap" returns ok for request 10
  modcall[authorize]: module "mschap" returns noop for request 10
    rlm_realm: No '@' in User-Name = "zzm183", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 10
  rlm_eap: No EAP-Message, not doing EAP
  modcall[authorize]: module "eap" returns noop for request 10
    users: Matched entry DEFAULT at line 153
    users: Matched entry DEFAULT at line 172
    users: Matched entry DEFAULT at line 184
  modcall[authorize]: module "files" returns ok for request 10
radius_xlat:  'zzm183'
rlm_sql (sql): sql_set_user escaped user --> 'zzm183'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM radcheck           WHERE Username = 'zzm183' and (mac='0:b:6a:e2:6a:3e'           or isnull(mac) or mac='') ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 4
radius_xlat:  'SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE usergroup.Username = 'zzm183' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM radreply           WHERE Username = 'zzm183'           ORDER BY id'
radius_xlat:  'SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE usergroup.Username = 'zzm183' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql (sql): Released sql socket id: 4
  modcall[authorize]: module "sql" returns ok for request 10
rlm_pap: Found existing Auth-Type, not changing it.
  modcall[authorize]: module "pap" returns noop for request 10
modcall: leaving group authorize (returns ok) for request 10
  rad_check_password:  Found Auth-Type CHAP
auth: type "CHAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group CHAP for request 10
  rlm_chap: login attempt by "zzm183" with CHAP password
  rlm_chap: Using clear text password "5903011e" for user zzm183 authentication.
  rlm_chap: chap user zzm183 authenticated succesfully
  modcall[authenticate]: module "chap" returns ok for request 10
modcall: leaving group CHAP (returns ok) for request 10
  Processing the post-auth section of radiusd.conf
modcall: entering group post-auth for request 10
rlm_sql (sql): Processing sql_postauth
radius_xlat:  'zzm183'
rlm_sql (sql): sql_set_user escaped user --> 'zzm183'
radius_xlat:  'UPDATE radcheck set mac='0:b:6a:e2:6a:3e' WHERE Username = 'zzm183' and (mac='' or isnull(mac))'
rlm_sql (sql) in sql_postauth: query is UPDATE radcheck set mac='0:b:6a:e2:6a:3e' WHERE Username = 'zzm183' and (mac='' or isnull(mac))
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): Released sql socket id: 3
  modcall[post-auth]: module "sql" returns ok for request 10
modcall: leaving group post-auth (returns ok) for request 10
Sending Access-Accept of id 85 to 127.0.0.1 port 65420
        Framed-IP-Address = 255.255.255.254
        Framed-MTU = 576
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Framed-Compression = Van-Jacobson-TCP-IP
Finished request 10
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Accounting-Request packet from host 127.0.0.1:54901, id=225, length=141
        User-Name = "zzm183"
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Framed-IP-Address = 192.168.50.1
        Framed-IP-Netmask = 0.0.0.0
        Calling-Station-Id = "0:b:6a:e2:6a:3e"
        NAS-IP-Address = 192.168.10.50
        NAS-Identifier = "ROUTE.hjsj.com"
        NAS-Port-Type = Ethernet
        NAS-Port = 22
        Acct-Status-Type = Start
        Acct-Session-Id = "17894-zzm1831225977208"
        Acct-Multi-Session-Id = ""
        Acct-Delay-Time = 0
  Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 11
  modcall[preacct]: module "preprocess" returns noop for request 11
rlm_acct_unique: Hashing 'NAS-Port = 22,Client-IP-Address = 127.0.0.1,NAS-IP-Address = 192.168.10.50,Acct-Session-Id = "17894-zzm1831225977208",User-Name = "zzm183"'
rlm_acct_unique: Acct-Unique-Session-ID = "1e981ec075736bdc".
  modcall[preacct]: module "acct_unique" returns ok for request 11
    rlm_realm: No '@' in User-Name = "zzm183", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[preacct]: module "suffix" returns noop for request 11
  modcall[preacct]: module "files" returns noop for request 11
modcall: leaving group preacct (returns ok) for request 11
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 11
radius_xlat:  '/var/log/radacct/127.0.0.1/detail-20081106'
rlm_detail: /var/log/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/radacct/127.0.0.1/detail-20081106
  modcall[accounting]: module "detail" returns ok for request 11
  modcall[accounting]: module "unix" returns ok for request 11
radius_xlat:  '/var/log/radutmp'
radius_xlat:  'zzm183'
  modcall[accounting]: module "radutmp" returns ok for request 11
radius_xlat:  'zzm183'
rlm_sql (sql): sql_set_user escaped user --> 'zzm183'
radius_xlat:  '           INSERT INTO radacct             (AcctSessionId,    AcctUniqueId,     UserName,              Realm,            NASIPAddress,     NASPortId,              NASPortType,      AcctStartTime,    AcctStopTime,              AcctSessionTime,  AcctAuthentic,    ConnectInfo_start,              ConnectInfo_stop, AcctInputOctets,  AcctOutputOctets,              CalledStationId,  CallingStationId, AcctTerminateCause,              ServiceType,      FramedProtocol,   FramedIPAddress,              AcctStartDelay,   AcctStopDelay,    XAscendSessionSvrKey)           VALUES             ('17894-zzm1831225977208', '1e981ec075736bdc',              'zzm183',              '', '192.168.10.50', '22',              'Ethernet', '2008-11-06 21:13:28', '0',              '0', '', '',              '', '0', '0',              '', '0:b:6a:e2:6a:3e', '',              'Framed-User', 'PPP', '192.168.50.1',              '0', '0', '')'
rlm_sql (sql): Reserving sql socket id: 2
rlm_sql (sql): Released sql socket id: 2
  modcall[accounting]: module "sql" returns ok for request 11
modcall: leaving group accounting (returns ok) for request 11
Sending Accounting-Response of id 225 to 127.0.0.1 port 54901
Finished request 11
Going to the next request
Waking up in 6 seconds...
--- Walking the entire request list ---
Cleaning up request 10 ID 85 with timestamp 4912ed78
Cleaning up request 11 ID 225 with timestamp 4912ed78
Nothing to do.  Sleeping until we see a request.
大家给点建议吧,,, 没一个人回的,,郁闷~~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP