<DIV>Hi,</DIV>
<DIV>
<DIV> I've set up a freeradius server for Netscreen VPN with <SPAN lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">Mysql <st1:chsdate w:st="on" IsROCDate="False" IsLunarDate="False" Day="30" Month="12" Year="1899">5.0.22 and freeradius 2.0.5</st1:chsdate></SPAN>, and radiusd service is runing well, I can connect the VPN, and everything seems to be ok. But we have a unique need to allow more than 1 pc to login the VPN with the same username at the same time. So the Problem is ---only 1 pc can login, if another pc login with the same username, the previous connection will logout automaticly. This sounds kind of strange 'cause I use no simultaneous-use limitation, and the Netscreen share-limit has been set upto 1000.</DIV>
<DIV> I tried the following ways to solve this problem, but failed.</DIV>
<DIV> 1. I stop the freeradius acct port (1813) listen, I thought this might stop the acct information feed back to netscreen (NAS). But it turn out to be that nobody can login.</DIV>
<DIV> 2. I setup simul-use control with sql query, and I create a usergroup in mysql, join the username into this group, and set the Simultaneous-Use as 5 in radgroupcheck table for this group. But only 1 person can login.</DIV>
<DIV> 3. I Doubt That whether the radutmp limit the login, then i comment everything about radutmp in radiusd.conf, default.conf etc. But the things turn out to be the same. Then I stop the sql simul-query, but hte same.</DIV>
<DIV>One strange thing: no matter what simul-query ( sql or radutmp) I use, both the radlast and the radacct table log the session.</DIV>
<DIV> I'm wondering: Besides sql and radutmp, something is doing the simul-use verify job?<BR>So i don't know where i've done wrong. Hope someone can help out.</DIV>
<DIV> </DIV>
<DIV>here is the radiusd -X result:</DIV>
<DIV>[root@localhost ~]# radiusd -X<BR>FreeRADIUS Version 2.0.5, for host i686-pc-linux-gnu, built on Aug 22 2008 at 16:32:02<BR>Copyright (C) 1999-2008 The FreeRADIUS server project and contributors. <BR>There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A <BR>PARTICULAR PURPOSE. <BR>You may redistribute copies of FreeRADIUS under the terms of the <BR>GNU General Public License v2. <BR>Starting - reading configuration files ...<BR>including configuration file /usr/local/etc/raddb/radiusd.conf<BR>including configuration file /usr/local/etc/raddb/proxy.conf<BR>including configuration file /usr/local/etc/raddb/clients.conf<BR>including configuration file /usr/local/etc/raddb/snmp.conf<BR>including files in directory /usr/local/etc/raddb/modules/<BR>including configuration file /usr/local/etc/raddb/modules/etc_group<BR>including configuration file /usr/local/etc/raddb/modules/checkval<BR>including configuration file /usr/local/etc/raddb/modules/passwd<BR>including configuration file /usr/local/etc/raddb/modules/detail<BR>including configuration file /usr/local/etc/raddb/modules/always<BR>including configuration file /usr/local/etc/raddb/modules/unix<BR>including configuration file /usr/local/etc/raddb/modules/attr_rewrite<BR>including configuration file /usr/local/etc/raddb/modules/policy<BR>including configuration file /usr/local/etc/raddb/modules/sql_log<BR>including configuration file /usr/local/etc/raddb/modules/detail.log<BR>including configuration file /usr/local/etc/raddb/modules/mac2vlan<BR>including configuration file /usr/local/etc/raddb/modules/ldap<BR>including configuration file /usr/local/etc/raddb/modules/preprocess<BR>including configuration file /usr/local/etc/raddb/modules/smbpasswd<BR>including configuration file /usr/local/etc/raddb/modules/logintime<BR>including configuration file /usr/local/etc/raddb/modules/expr<BR>including configuration file /usr/local/etc/raddb/modules/acct_unique<BR>including configuration file /usr/local/etc/raddb/modules/expiration<BR>including configuration file /usr/local/etc/raddb/modules/echo<BR>including configuration file /usr/local/etc/raddb/modules/ippool<BR>including configuration file /usr/local/etc/raddb/modules/realm<BR>including configuration file /usr/local/etc/raddb/modules/radutmp<BR>including configuration file /usr/local/etc/raddb/modules/files<BR>including configuration file /usr/local/etc/raddb/modules/attr_filter<BR>including configuration file /usr/local/etc/raddb/modules/chap<BR>including configuration file /usr/local/etc/raddb/modules/mac2ip<BR>including configuration file /usr/local/etc/raddb/modules/sradutmp<BR>including configuration file /usr/local/etc/raddb/modules/pam<BR>including configuration file /usr/local/etc/raddb/modules/pap<BR>including configuration file /usr/local/etc/raddb/modules/krb5<BR>including configuration file /usr/local/etc/raddb/modules/exec<BR>including configuration file /usr/local/etc/raddb/modules/counter<BR>including configuration file /usr/local/etc/raddb/modules/mschap<BR>including configuration file /usr/local/etc/raddb/modules/digest<BR>including configuration file /usr/local/etc/raddb/eap.conf<BR>including configuration file /usr/local/etc/raddb/sql.conf<BR>including configuration file /usr/local/etc/raddb/sql/mysql/dialup.conf<BR>including configuration file /usr/local/etc/raddb/sql/mysql/counter.conf<BR>including configuration file /usr/local/etc/raddb/policy.conf<BR>including files in directory /usr/local/etc/raddb/sites-enabled/<BR>including configuration file /usr/local/etc/raddb/sites-enabled/default<BR>including configuration file /usr/local/etc/raddb/sites-enabled/inner-tunnel<BR>including dictionary file /usr/local/etc/raddb/dictionary<BR>main {<BR> prefix = "/usr/local"<BR> localstatedir = "/usr/local/var"<BR> logdir = "/usr/local/var/log/radius"<BR> libdir = "/usr/local/lib"<BR> radacctdir = "/usr/local/var/log/radius/radacct"<BR> hostname_lookups = no<BR> max_request_time = 30<BR> cleanup_delay = 5<BR> max_requests = 1024<BR> allow_core_dumps = no<BR> pidfile = "/usr/local/var/run/radiusd/radiusd.pid"<BR> checkrad = "/usr/local/sbin/checkrad"<BR> debug_level = 0<BR> proxy_requests = yes<BR> log {<BR> stripped_names = no<BR> auth = yes<BR> auth_badpass = yes<BR> auth_goodpass = yes<BR> }<BR>}<BR> client localhost {<BR> ipaddr = 127.0.0.1<BR> require_message_authenticator = no<BR> secret = "testing123"<BR> nastype = "other"<BR> }<BR> client 10.249.0.0/16 {<BR> require_message_authenticator = no<BR> secret = "testing123"<BR> shortname = "localhost"<BR> nastype = "other"<BR> }<BR> client 192.168.1.0/24 {<BR> require_message_authenticator = no<BR> secret = "testing123"<BR> shortname = "localhost"<BR> nastype = "other"<BR> }<BR>radiusd: #### Loading Realms and Home Servers ####<BR> proxy server {<BR> retry_delay = 5<BR> retry_count = 3<BR> default_fallback = no<BR> dead_time = 120<BR> wake_all_if_all_dead = no<BR> }<BR> home_server localhost {<BR> ipaddr = 127.0.0.1<BR> port = 1812<BR> type = "auth"<BR> secret = "testing123"<BR> response_window = 20<BR> max_outstanding = 65536<BR> zombie_period = 40<BR> status_check = "status-server"<BR> ping_check = "none"<BR> ping_interval = 30<BR> check_interval = 30<BR> num_answers_to_alive = 3<BR> num_pings_to_alive = 3<BR> revive_interval = 120<BR> status_check_timeout = 4<BR> }<BR> home_server_pool my_auth_failover {<BR> type = fail-over<BR> home_server = localhost<BR> }<BR> realm example.com {<BR> auth_pool = my_auth_failover<BR> }<BR> realm LOCAL {<BR> }<BR>radiusd: #### Instantiating modules ####<BR> instantiate {<BR> Module: Linked to module rlm_exec<BR> Module: Instantiating exec<BR> exec {<BR> wait = no<BR> input_pairs = "request"<BR> shell_escape = yes<BR> }<BR> Module: Linked to module rlm_expr<BR> Module: Instantiating expr<BR> Module: Linked to module rlm_expiration<BR> Module: Instantiating expiration<BR> expiration {<BR> reply-message = "Password Has Expired "<BR> }<BR> Module: Linked to module rlm_logintime<BR> Module: Instantiating logintime<BR> logintime {<BR> reply-message = "You are calling outside your allowed timespan "<BR> minimum-timeout = 60<BR> }<BR> }<BR>radiusd: #### Loading Virtual Servers ####<BR>server inner-tunnel {<BR> modules {<BR> Module: Checking authenticate {...} for more modules to load<BR> Module: Linked to module rlm_pap<BR> Module: Instantiating pap<BR> pap {<BR> encryption_scheme = "auto"<BR> auto_header = no<BR> }<BR> Module: Linked to module rlm_chap<BR> Module: Instantiating chap<BR> Module: Linked to module rlm_mschap<BR> Module: Instantiating mschap<BR> mschap {<BR> use_mppe = yes<BR> require_encryption = no<BR> require_strong = no<BR> with_ntdomain_hack = no<BR> }<BR> Module: Linked to module rlm_unix<BR> Module: Instantiating unix<BR> unix {<BR> radwtmp = "/usr/local/var/log/radius/radwtmp"<BR> }<BR> Module: Linked to module rlm_eap<BR> Module: Instantiating eap<BR> eap {<BR> default_eap_type = "md5"<BR> timer_expire = 60<BR> ignore_unknown_eap_types = no<BR> cisco_accounting_username_bug = no<BR> }<BR> Module: Linked to sub-module rlm_eap_md5<BR> Module: Instantiating eap-md5<BR> Module: Linked to sub-module rlm_eap_leap<BR> Module: Instantiating eap-leap<BR> Module: Linked to sub-module rlm_eap_gtc<BR> Module: Instantiating eap-gtc<BR> gtc {<BR> challenge = "Password: "<BR> auth_type = "PAP"<BR> }<BR> Module: Linked to sub-module rlm_eap_tls<BR> Module: Instantiating eap-tls<BR> tls {<BR> rsa_key_exchange = no<BR> dh_key_exchange = yes<BR> rsa_key_length = 512<BR> dh_key_length = 512<BR> verify_depth = 0<BR> pem_file_type = yes<BR> private_key_file = "/usr/local/etc/raddb/certs/server.pem"<BR> certificate_file = "/usr/local/etc/raddb/certs/server.pem"<BR> CA_file = "/usr/local/etc/raddb/certs/ca.pem"<BR> private_key_password = "whatever"<BR> dh_file = "/usr/local/etc/raddb/certs/dh"<BR> random_file = "/usr/local/etc/raddb/certs/random"<BR> fragment_size = 1024<BR> include_length = yes<BR> check_crl = no<BR> cipher_list = "DEFAULT"<BR> make_cert_command = "/usr/local/etc/raddb/certs/bootstrap"<BR> }<BR> Module: Linked to sub-module rlm_eap_ttls<BR> Module: Instantiating eap-ttls<BR> ttls {<BR> default_eap_type = "md5"<BR> copy_request_to_tunnel = no<BR> use_tunneled_reply = no<BR> virtual_server = "inner-tunnel"<BR> }<BR> Module: Linked to sub-module rlm_eap_peap<BR> Module: Instantiating eap-peap<BR> peap {<BR> default_eap_type = "mschapv2"<BR> copy_request_to_tunnel = no<BR> use_tunneled_reply = no<BR> proxy_tunneled_request_as_eap = yes<BR> virtual_server = "inner-tunnel"<BR> }<BR> Module: Linked to sub-module rlm_eap_mschapv2<BR> Module: Instantiating eap-mschapv2<BR> mschapv2 {<BR> with_ntdomain_hack = no<BR> }<BR> Module: Checking authorize {...} for more modules to load<BR> Module: Linked to module rlm_realm<BR> Module: Instantiating suffix<BR> realm suffix {<BR> format = "suffix"<BR> delimiter = "@"<BR> ignore_default = no<BR> ignore_null = no<BR> }<BR> Module: Linked to module rlm_files<BR> Module: Instantiating files<BR> files {<BR> usersfile = "/usr/local/etc/raddb/users"<BR> acctusersfile = "/usr/local/etc/raddb/acct_users"<BR> preproxy_usersfile = "/usr/local/etc/raddb/preproxy_users"<BR> compat = "no"<BR> }<BR> Module: Linked to module rlm_sql<BR> Module: Instantiating sql<BR> sql {<BR> driver = "rlm_sql_mysql"<BR> server = "localhost"<BR> port = ""<BR> login = "root"<BR> password = "123456"<BR> radius_db = "radius"<BR> read_groups = yes<BR> sqltrace = no<BR> sqltracefile = "/usr/local/var/log/radius/sqltrace.sql"<BR> readclients = no<BR> deletestalesessions = yes<BR> num_sql_socks = 5<BR> sql_user_name = "%{User-Name}"<BR> default_user_profile = ""<BR> nas_query = "SELECT id, nasname, shortname, type, secret FROM nas"<BR> authorize_check_query = "SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id"<BR> authorize_reply_query = "SELECT id, username, attribute, value, op FROM radreply WHERE username = '%{SQL-User-Name}' ORDER BY id"<BR> authorize_group_check_query = "SELECT id, groupname, attribute, Value, op FROM radgroupcheck WHERE groupname = '%{Sql-Group}' ORDER BY id"<BR> authorize_group_reply_query = "SELECT id, groupname, attribute, value, op FROM radgroupreply WHERE groupname = '%{Sql-Group}' ORDER BY id"<BR> accounting_onoff_query = " UPDATE radacct SET acctstoptime = '%S', acctsessiontime = unix_timestamp('%S') - unix_timestamp(acctstarttime), acctterminatecause = '%{Acct-Terminate-Cause}', acctstopdelay = %{%{Acct-Delay-Time}:-0} WHERE acctstoptime IS NULL AND nasipaddress = '%{NAS-IP-Address}' AND acctstarttime <= '%S'"<BR> accounting_update_query = " UPDATE radacct 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}'"<BR> accounting_update_query_alt = " INSERT INTO radacct (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}')"<BR> accounting_start_query = " 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 ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', NULL, '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}')"<BR> accounting_start_query_alt = " UPDATE radacct SET acctstarttime = '%S', acctstartdelay = '%{%{Acct-Delay-Time}:-0}', connectinfo_start = '%{Connect-Info}' WHERE acctsessionid = '%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}'"<BR> accounting_stop_query = ""<BR> accounting_stop_query_alt = ""<BR> group_membership_query = "SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority"<BR> connect_failure_retry_delay = 60<BR> simul_count_query = ""<BR> simul_verify_query = ""<BR> postauth_query = "INSERT INTO radpostauth (username, pass, reply, authdate) VALUES ( '%{User-Name}', '%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S')"<BR> safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"<BR> }<BR>rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked<BR>rlm_sql (sql): Attempting to connect to <A href="mailto:root@localhost:/radius" target="_blank">root@localhost:/radius</A><BR>rlm_sql (sql): starting 0<BR>rlm_sql (sql): Attempting to connect rlm_sql_mysql #0<BR>rlm_sql_mysql: Starting connect to MySQL server for #0<BR>rlm_sql (sql): Connected new DB handle, #0<BR>rlm_sql (sql): starting 1<BR>rlm_sql (sql): Attempting to connect rlm_sql_mysql #1<BR>rlm_sql_mysql: Starting connect to MySQL server for #1<BR>rlm_sql (sql): Connected new DB handle, #1<BR>rlm_sql (sql): starting 2<BR>rlm_sql (sql): Attempting to connect rlm_sql_mysql #2<BR>rlm_sql_mysql: Starting connect to MySQL server for #2<BR>rlm_sql (sql): Connected new DB handle, #2<BR>rlm_sql (sql): starting 3<BR>rlm_sql (sql): Attempting to connect rlm_sql_mysql #3<BR>rlm_sql_mysql: Starting connect to MySQL server for #3<BR>rlm_sql (sql): Connected new DB handle, #3<BR>rlm_sql (sql): starting 4<BR>rlm_sql (sql): Attempting to connect rlm_sql_mysql #4<BR>rlm_sql_mysql: Starting connect to MySQL server for #4<BR>rlm_sql (sql): Connected new DB handle, #4<BR> Module: Checking session {...} for more modules to load<BR> Module: Checking post-proxy {...} for more modules to load<BR> Module: Checking post-auth {...} for more modules to load<BR> Module: Linked to module rlm_attr_filter<BR> Module: Instantiating attr_filter.access_reject<BR> attr_filter attr_filter.access_reject {<BR> attrsfile = "/usr/local/etc/raddb/attrs.access_reject"<BR> key = "%{User-Name}"<BR> }<BR> }<BR>}<BR>server {<BR> modules {<BR> Module: Checking authenticate {...} for more modules to load<BR> Module: Checking authorize {...} for more modules to load<BR> Module: Linked to module rlm_preprocess<BR> Module: Instantiating preprocess<BR> preprocess {<BR> huntgroups = "/usr/local/etc/raddb/huntgroups"<BR> hints = "/usr/local/etc/raddb/hints"<BR> with_ascend_hack = no<BR> ascend_channels_per_line = 23<BR> with_ntdomain_hack = no<BR> with_specialix_jetstream_hack = no<BR> with_cisco_vsa_hack = no<BR> with_alvarion_vsa_hack = no<BR> }<BR> Module: Linked to module rlm_detail<BR> Module: Instantiating auth_log<BR> detail auth_log {<BR> detailfile = "/usr/local/var/log/radius/radacct/%{Client-IP-Address}/auth-detail-%Y%m%d"<BR> header = "%t"<BR> detailperm = 384<BR> dirperm = 493<BR> locking = no<BR> log_packet_header = no<BR> }<BR> Module: Checking preacct {...} for more modules to load<BR> Module: Linked to module rlm_acct_unique<BR> Module: Instantiating acct_unique<BR> acct_unique {<BR> key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"<BR> }<BR> Module: Checking accounting {...} for more modules to load<BR> Module: Instantiating detail<BR> detail {<BR> detailfile = "/usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d"<BR> header = "%t"<BR> detailperm = 384<BR> dirperm = 493<BR> locking = no<BR> log_packet_header = no<BR> }<BR> Module: Checking session {...} for more modules to load<BR> Module: Checking post-proxy {...} for more modules to load<BR> Module: Checking post-auth {...} for more modules to load<BR> Module: Instantiating reply_log<BR> detail reply_log {<BR> detailfile = "/usr/local/var/log/radius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d"<BR> header = "%t"<BR> detailperm = 384<BR> dirperm = 493<BR> locking = no<BR> log_packet_header = no<BR> }<BR> }<BR>}<BR>radiusd: #### Opening IP addresses and Ports ####<BR>listen {<BR> type = "auth"<BR> ipaddr = *<BR> port = 0<BR>}<BR>listen {<BR> type = "acct"<BR> ipaddr = *<BR> port = 0<BR>}<BR>Listening on authentication address * port 1812<BR>Listening on accounting address * port 1813<BR>Listening on proxy address * port 1814<BR>Ready to process requests.</DIV>
<DIV><BR> </DIV>
<DIV>Thanks in advance</DIV>
<DIV>Lorens</DIV></DIV><br><!-- footer --><br>
<hr>
<font style="font-size:12px;line-height:15px;">[广告] </font><font style="font-size:12px;line-height:15px;">金秋最</font><a style="font-size:12px;line-height:15px; color:blue; text-decoration:underline;" href="http://popme.163.com/link/003985_1010_7027.html">关注楼盘-房不胜房</a>