JuniperForum.com
March 10, 2010, 12:40:21 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: If you have an interesting idea for an article or knowledgebase entry, please submit it!
 
  Home Help Login Register  
* *
Pages: [1]
  Print  
Author Topic: Per-user RADIUS authentication EX 4200 switch  (Read 678 times)
F1ght3r
Newbie
*
Posts: 4


View Profile
« on: February 04, 2010, 06:08:28 AM »

Dear colleagues,

currently I sit in front of an EX 4200 switch with JunOS 10.0R2 and try to implement per-user RADIUS authentication. I adapted the config from the code example Juniper provides at http://www.juniper.net/techpubs/en_US/junos10.0/information-products/topic-collections/subscriber-access/aaa-subscriber-access-radius-authentication-accounting.html and http://www.juniper.net/techpubs/en_US/junos9.6/topics/task/configuration/radius-server-ex-series-cli.html.
 
This is my config at the moment (only the necessary parts):

access {
    radius-server {
        192.168.2.1 {
            secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; ## SECRET-DATA
            timeout 3;
            retry 1;
            source-address 192.168.3.15; (this is the outgoing interface IP)
        }
        192.168.1.1 {
            secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; ## SECRET-DATA
            timeout 3;
            retry 1;
            source-address 192.168.3.15; (this is the outgoing interface IP)
        }
    }
    profile profile1 {
        authentication-order radius;
        radius {
            authentication-server [ 192.168.2.1 192.168.1.1 ];
            accounting-server [ 192.168.2.1 192.168.1.1 ];
        }
        accounting {
            order radius;
            accounting-stop-on-failure;
            accounting-stop-on-access-deny;
            immediate-update;
            statistics time;
        }
    }
}
 

With this code, the EX does not try to contact the RADIUS server (of course, the server itself is reachable). In the RADIUS log messages there is no entry for an authentication try.

The Syslog shows the following output (first try SSH, second try telnet):

"Dec 13 07:52:39   sshd[1405]: Failed password for test from 192.168.3.1 port 4796 ssh2
Dec 13 07:52:43   inetd[709]: /usr/sbin/sshd[1405]: exited, status 255
Dec 13 07:53:03   login: LOGIN_PAM_AUTHENTICATION_ERROR: PAM authentication error for user test
Dec 13 07:53:03   login: LOGIN_FAILED: Login failed for user test from host 192.168.3.1"


In the JunOS Cookbook, I found an instruction to implement the following code:

system {
    radius-server {
        192.168.2.1 {
            port 1645;
            accounting-port 1646;
            secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; ## SECRET-DATA
            timeout 3;
            retry 1;
        }
        192.168.1.1 {
            port 1645;
            accounting-port 1646;
            secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; ## SECRET-DATA
            timeout 3;
            retry 1;
        }
    }
 

This doesn't help anyway, I can only log in with the locally configured username.

Did I forget anything? I hope someone has an idea.

Thank you!
Logged
frogmanclay
Full Member
***
Posts: 138


View Profile
« Reply #1 on: February 04, 2010, 09:37:13 AM »

set the radius server under the system stanza.   Also, set the authentication-order there.  It isn't trying the radius server because you don't have it set to.  IE. set system authentication-order radius

Hope that helps,
Clay
Logged
F1ght3r
Newbie
*
Posts: 4


View Profile
« Reply #2 on: February 05, 2010, 02:43:53 AM »

The authentication-order command is only available in the "access profile profile-name" stanza, I cannot configure it in the system stanza (see http://www.juniper.net/techpubs/en_US/junos10.0/information-products/topic-collections/subscriber-access/authentication-order-edit-access.html#jd0e20818).
Logged
frogmanclay
Full Member
***
Posts: 138


View Profile
« Reply #3 on: February 05, 2010, 08:10:37 AM »

ok, are you trying to use radius to authenticate when you connect to the switch for management of said switch?  Or are you trying to use radius to authenticate users connecting to the switch for network access?  If the first is true, then try what I said above.  If the second is true, then the link you provided is true.

Hope that helps,
Clay
Logged
F1ght3r
Newbie
*
Posts: 4


View Profile
« Reply #4 on: February 06, 2010, 02:31:38 PM »

Hi Clay,
now it works. The problem was that I didn't create the local user ID "remote" so I couldn't log in even though the user was sucessfully authenticated by the RADIUS server.

Thank you very much for you help!
Daniel
Logged
F1ght3r
Newbie
*
Posts: 4


View Profile
« Reply #5 on: February 08, 2010, 06:56:33 AM »

Oh yes, there's still one question: I want to set that the RADIUS user is only asked for when connecting through telnet or SSH, but not over the console line. Here the switch should only accept the locally configured user.

Any idea how to solve this?
Logged
Pages: [1]
  Print  
 
Jump to:  

Navigation

Donate

Please consider donating if we've saved you time or money. It helps pay for the bandwidth, equipment, and hosting charges to keep this site running

Tools

Submit Article/KB - Do not submit questions here.

Recent

Stats

Members
  • Total Members: 20486
  • Latest: Snok
Stats
  • Total Posts: 38002
  • Total Topics: 9817
  • Online Today: 65
  • Online Ever: 393
  • (August 06, 2008, 07:40:57 AM)
Users Online
Users: 2
Guests: 44
Total: 46
TinyPortal v1.0 beta 4 © Bloc
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.216 seconds with 35 queries.