Hi,

I want reject a user only on a particular Nas.
This have to connect on other Nas.

So i code user's file with a entry Auth-Type := Reject.
In spite of this, the user continue to be accept on this Nas (@ip : 10.154.100.15).

Two entry (line 3 and line 5) of users file is matched !!!

Thank for your help.

++++ See below users's file :
#
# No VPN-Nas Access
a0153   Auth-Type := Reject, NAS-IP-Address == 10.154.100.15
        Reply-Message =  "No VPN Access for you"

a0153   Auth-Type := LDAP
        Service-Type = NAS-Prompt-User,
        cisco-avpair = "shell:idletime=10",
        Idle-Timeout = 600,
        Reply-Message =  "Hello !"

++++ See below radiusd's log :
Starting - reading configuration files ...
reread_config: reading radiusd.conf
Config: including file: /opt/freeradius/etc/raddb/proxy.conf
Config: including file: /opt/freeradius/etc/raddb/clients.conf
Config: including file: /opt/freeradius/etc/raddb/snmp.conf
Config: including file: /opt/freeradius/etc/raddb/sql.conf
main: prefix = "/opt/freeradius"
main: localstatedir = "/opt/freeradius/var"
main: logdir = "/opt/freeradius/var/log/radius"
main: libdir = "/opt/freeradius/lib"
main: radacctdir = "/opt/freeradius/var/log/radius/radacct"
main: hostname_lookups = no
main: max_request_time = 30
main: cleanup_delay = 5
main: max_requests = 1024
main: delete_blocked_requests = 0
main: port = 1812
main: allow_core_dumps = no
main: log_stripped_names = yes
main: log_file = "/opt/freeradius/var/log/radius/radius.log"
main: log_auth = yes
main: log_auth_badpass = no
main: log_auth_goodpass = no
main: pidfile = "/opt/freeradius/var/run/radiusd/radiusd.pid"
main: user = "radiusd"
main: group = "radiusd"
main: usercollide = yes
main: lower_user = "no"
main: lower_pass = "no"
main: nospace_user = "no"
main: nospace_pass = "no"
main: checkrad = "/opt/freeradius/sbin/checkrad"
main: proxy_requests = yes
proxy: retry_delay = 5
proxy: retry_count = 3
proxy: synchronous = no
proxy: default_fallback = yes
proxy: dead_time = 120
proxy: post_proxy_authorize = yes
proxy: wake_all_if_all_dead = no
security: max_attributes = 200
security: reject_delay = 1
security: status_server = no
main: debug_level = 0
read_config_files: reading dictionary
read_config_files: reading naslist
Using deprecated naslist file. Support for this will go away soon.
read_config_files: reading clients
Using deprecated clients file. Support for this will go away soon.
read_config_files: reading realms
Using deprecated realms file. Support for this will go away soon.
radiusd: entering modules setup
Module: Library search path is /opt/freeradius/lib
Module: Loaded LDAP
ldap: server = "10.154.32.1"
ldap: port = 3268
ldap: net_timeout = 1
ldap: timeout = 4
ldap: timelimit = 3
ldap: identity = ""
ldap: start_tls = no
ldap: password = ""
ldap: basedn = "dc=platine,dc=org"
ldap: filter = "(cn=%u)"
ldap: default_profile = "(null)"
ldap: profile_attribute = "(null)"
ldap: password_header = "(null)"
ldap: password_attribute = "(null)"
ldap: access_attr = "dialupAccess"
ldap: groupname_attribute = "cn"
ldap: groupmembership_filter = "(|(&(objectClass=GroupOfNames)(member=%{Ldap-UserDn}))(&(objectClass=GroupOfUniqueNames)(uniquemember=%{Ldap-UserDn})))"
ldap: groupmembership_attribute = "(null)"
ldap: dictionary_mapping = "/opt/freeradius/etc/raddb/ldap.attrmap"
ldap: ldap_debug = 0
ldap: ldap_connections_number = 5
ldap: compare_check_items = no
ldap: access_attr_used_for_allow = yes
conns: (nil)
rlm_ldap: reading ldap<->radius mappings from file /opt/freeradius/etc/raddb/ldap.attrmap
rlm_ldap: LDAP radiusCheckItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusReplyItem mapped to RADIUS $GENERIC$
rlm_ldap: LDAP radiusAuthType mapped to RADIUS Auth-Type
rlm_ldap: LDAP radiusSimultaneousUse mapped to RADIUS Simultaneous-Use
rlm_ldap: LDAP radiusCalledStationId mapped to RADIUS Called-Station-Id
rlm_ldap: LDAP radiusCallingStationId mapped to RADIUS Calling-Station-Id
rlm_ldap: LDAP lmPassword mapped to RADIUS LM-Password
rlm_ldap: LDAP ntPassword mapped to RADIUS NT-Password
rlm_ldap: LDAP acctFlags mapped to RADIUS SMB-Account-CTRL-TEXT
rlm_ldap: LDAP radiusExpiration mapped to RADIUS Expiration
rlm_ldap: LDAP radiusServiceType mapped to RADIUS Service-Type
rlm_ldap: LDAP radiusFramedProtocol mapped to RADIUS Framed-Protocol
rlm_ldap: LDAP radiusFramedIPAddress mapped to RADIUS Framed-IP-Address
rlm_ldap: LDAP radiusFramedIPNetmask mapped to RADIUS Framed-IP-Netmask
rlm_ldap: LDAP radiusFramedRoute mapped to RADIUS Framed-Route
rlm_ldap: LDAP radiusFramedRouting mapped to RADIUS Framed-Routing
rlm_ldap: LDAP radiusFilterId mapped to RADIUS Filter-Id
rlm_ldap: LDAP radiusFramedMTU mapped to RADIUS Framed-MTU
rlm_ldap: LDAP radiusFramedCompression mapped to RADIUS Framed-Compression
rlm_ldap: LDAP radiusLoginIPHost mapped to RADIUS Login-IP-Host
rlm_ldap: LDAP radiusLoginService mapped to RADIUS Login-Service
rlm_ldap: LDAP radiusLoginTCPPort mapped to RADIUS Login-TCP-Port
rlm_ldap: LDAP radiusCallbackNumber mapped to RADIUS Callback-Number
rlm_ldap: LDAP radiusCallbackId mapped to RADIUS Callback-Id
rlm_ldap: LDAP radiusFramedIPXNetwork mapped to RADIUS Framed-IPX-Network
rlm_ldap: LDAP radiusClass mapped to RADIUS Class
rlm_ldap: LDAP radiusSessionTimeout mapped to RADIUS Session-Timeout
rlm_ldap: LDAP radiusIdleTimeout mapped to RADIUS Idle-Timeout
rlm_ldap: LDAP radiusTerminationAction mapped to RADIUS Termination-Action
rlm_ldap: LDAP radiusLoginLATService mapped to RADIUS Login-LAT-Service
rlm_ldap: LDAP radiusLoginLATNode mapped to RADIUS Login-LAT-Node
rlm_ldap: LDAP radiusLoginLATGroup mapped to RADIUS Login-LAT-Group
rlm_ldap: LDAP radiusFramedAppleTalkLink mapped to RADIUS Framed-AppleTalk-Link
rlm_ldap: LDAP radiusFramedAppleTalkNetwork mapped to RADIUS Framed-AppleTalk-Network
rlm_ldap: LDAP radiusFramedAppleTalkZone mapped to RADIUS Framed-AppleTalk-Zone
rlm_ldap: LDAP radiusPortLimit mapped to RADIUS Port-Limit
rlm_ldap: LDAP radiusLoginLATPort mapped to RADIUS Login-LAT-Port
conns: 0x811da88
Module: Instantiated ldap (ldap)
Module: Loaded preprocess
preprocess: huntgroups = "/opt/freeradius/etc/raddb/huntgroups"
preprocess: hints = "/opt/freeradius/etc/raddb/hints"
preprocess: with_ascend_hack = no
preprocess: ascend_channels_per_line = 23
preprocess: with_ntdomain_hack = no
preprocess: with_specialix_jetstream_hack = no
preprocess: with_cisco_vsa_hack = no
Module: Instantiated preprocess (preprocess)
Module: Loaded realm
realm: format = "suffix"
realm: delimiter = "@"
Module: Instantiated realm (suffix)
Module: Loaded files
files: usersfile = "/opt/freeradius/etc/raddb/users"
files: acctusersfile = "/opt/freeradius/etc/raddb/acct_users"
files: preproxy_usersfile = "/opt/freeradius/etc/raddb/preproxy_users"
files: compat = "no"
Module: Instantiated files (files)
Module: Loaded detail
detail: detailfile = "/opt/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail"
detail: detailperm = 384
detail: dirperm = 493
detail: locking = no
Module: Instantiated detail (detail)
Module: Loaded radutmp
radutmp: filename = "/opt/freeradius/var/log/radius/radutmp"
radutmp: username = "%{User-Name}"
radutmp: case_sensitive = yes
radutmp: check_with_nas = yes
radutmp: perm = 384
radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
Listening on IP address *, ports 1812/udp and 1813/udp, with proxy on 1814/udp.
Ready to process requests.
rad_recv: Access-Request packet from host 10.154.100.15:21646, id=39, length=88
User-Name = "a0153"
Reply-Message = "Password: "
User-Password = "XXXXXXXX"
NAS-Port = 66
NAS-Port-Type = Virtual
Calling-Station-Id = "10.154.99.1"
NAS-IP-Address = 10.154.100.15
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
rlm_realm: No '@' in User-Name = "a0153", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop
users: Checking a0153 at 3
rad_check_password: Found Auth-Type Reject
rad_check_password: Auth-Type = Reject, rejecting user
users: Checking a0153 at 6
rad_check_password: Found Auth-Type LDAP
auth: type "LDAP"
modcall: entering group authtype
rlm_ldap: - authenticate
rlm_ldap: login attempt by "a0153" with password "XXXXXXXX"
radius_xlat: '(cn=a0153)'
radius_xlat: 'dc=platine,dc=org'
ldap_get_conn: Got Id: 0
rlm_ldap: attempting LDAP reconnection
rlm_ldap: (re)connect to 10.154.32.1:3268, authentication 0
rlm_ldap: bind as / to 10.154.32.1:3268
rlm_ldap: waiting for bind result ...
rlm_ldap: performing search in dc=platine,dc=org, with filter (cn=a0153)
ldap_release_conn: Release Id: 0
rlm_ldap: user DN: CN=A0153,OU=Users,DC=corporate,DC=platine,DC=org
rlm_ldap: (re)connect to 10.154.32.1:3268, authentication 1
rlm_ldap: bind as CN=A0153,OU=Users,DC=corporate,DC=platine,DC=org/XXXXXXXX to 10.154.32.1:3268
rlm_ldap: waiting for bind result ...
rlm_ldap: user a0153 authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authtype returns ok
users: Matched a0153 at 6
modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
rad_check_password: Found Auth-Type LDAP
auth: type "LDAP"
modcall: entering group authtype
rlm_ldap: - authenticate
rlm_ldap: login attempt by "a0153" with password "XXXXXXXX"
rlm_ldap: user DN: CN=A0153,OU=Users,DC=corporate,DC=platine,DC=org
rlm_ldap: (re)connect to 10.154.32.1:3268, authentication 1
rlm_ldap: bind as CN=A0153,OU=Users,DC=corporate,DC=platine,DC=org/XXXXXXXX to 10.154.32.1:3268
rlm_ldap: waiting for bind result ...
rlm_ldap: user a0153 authenticated succesfully
modcall[authenticate]: module "ldap" returns ok
modcall: group authtype returns ok
radius_xlat: 'Hello !'
Login OK: [a0153] (from client r-vpn-b.rtr.corporate.net port 66 cli 10.154.99.1)
Sending Access-Accept of id 39 to 10.154.100.15:21646
Service-Type = NAS-Prompt-User
Cisco-AVPair = "shell:idletime=10"
Idle-Timeout = 600
Reply-Message = "Hello !"
Finished request 0
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Accounting-Request packet from host 10.154.100.15:21646, id=40, length=92
Acct-Session-Id = "00000055"
Acct-Authentic = RADIUS
User-Name = "a0153"
Acct-Status-Type = Start
NAS-Port = 66
NAS-Port-Type = Virtual
Calling-Station-Id = "10.154.99.1"
Service-Type = NAS-Prompt-User
NAS-IP-Address = 10.154.100.15
Acct-Delay-Time = 0
modcall: entering group preacct
modcall[preacct]: module "preprocess" returns noop
rlm_realm: No '@' in User-Name = "a0153", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[preacct]: module "suffix" returns noop
modcall[preacct]: module "files" returns noop
modcall: group preacct returns noop
modcall: entering group accounting
radius_xlat: '/opt/freeradius/var/log/radius/radacct/10.154.100.15/detail'
rlm_detail: /opt/freeradius/var/log/radius/radacct/%{Client-IP-Address}/detail expands to /opt/freeradius/var/log/radius/radacct/10.154.100.15/detail
modcall[accounting]: module "detail" returns ok
radius_xlat: '/opt/freeradius/var/log/radius/radutmp'
radius_xlat: 'a0153'
modcall[accounting]: module "radutmp" returns ok
modcall: group accounting returns ok
Sending Accounting-Response of id 40 to 10.154.100.15:21646
Finished request 1
Going to the next request
Waking up in 6 seconds...




#========================================================= # Default Authentication #=========================================================

# Reject all
#---------------------------------------------------------
DEFAULT Auth-Type := Reject
Reply-Message = "Authentification failed (Warning ! Authorized Users only !)"

--
--  Jean-Paul Chapalain - GICM -  Reseaux et Systemes Distribues
--  32 rue Mirabeau - Le Relecq-Kerhuon - 29808 Brest Cedex 9, FRANCE
--  Tel +33298002873 - Fax +33298284005 - [EMAIL PROTECTED]
--  Key Fingerprint: 192C 1CFE F24A 050D F280 A086 AF15 8631 3ABB 4C7D

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to