한국어

네트워킹

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app



http://blog.naver.com/PostView.nhn?blogId=pcw4844&logNo=70132882598


FreeRADIUS 설치(freeradius-sever-2.1.8)

1. Confiture FreeRadius
#./configure --prefix=/usr/local/radius

 

2. 설치
#make

#make install

 

 

FreeRADIUS 기본 설정

1. Radius Server 세팅

vi /usr/local/radius/etc/raddb/radiusd.conf

 

listen  {

ipaddr = 192.168.11.8   -> radius 서버 ip

port = 1812            -> 수신 port 설정(udp 1812)

         interface = eth0        -> 해당 인터페이스로 수신/응답

}

 

2. Radius Client 세팅
vi /usr/local/radius/etc/raddb/clients.conf

client 192.168.1.0/24 {             -> NAS(radius 클라이언트, VPN ) IP 대역단일 IP도 가능

           secret      = netmania      

        nastype    = other

}

 

3. user 세팅
vi /usr/local/radius/etc/raddb/users

 

test01    Cleartext-Password := "test_01"   -> 인증 대상이 되는 사용자 ID/PW

 

4. Radius Server실행
#cd /usr/local/radius/sbin

#./radiusd -X    -> 디버그 모드로 실행로그가 바로 화면에 출력됨단 로그는 쌓이지 않음

#./radiusd       -> 백그라운드로 실행로그 저장 됨

5. 로그 저장 경로

#/usr/local/radius/var/log/radius/radius.log


MySQL 연동

 

1. DB에 저장 되는 부분

mysql과 연동 시 mysql DB에 저장 되는 내용은 /usr/local/radius/etc/raddb/users에서 설정해야

하는 내용으로 인증 대상이 되는 사용자 ID/PW 이다.

 

2. radiusd.conf 파일 설정

vi /usr/local/radius/etc/raddb/radiusd.conf

authorize {

       preprocess

       chap

       mschap

       suffix

       eap

       files

       sql

       pap

}

 

preacct {

       preprocess

       acct_unique

       suffix

       files

}

 

accounting {

       detail

       unix

       radutmp

       sql

}

-> , MODULE CONFIGURATION 앞에 추가 시킴

 

# PROXY CONFIGURATION

proxy_requests  = no     -> proxy는 테스트 전이며 이 설정은 안 해도 됨

 

 

# MODULE CONFIGURATION

modules {

$INCLUDE sql.conf          -> 주석 처리를 해제 하여, SQL 모듈이 동작되도록 함

}

 

3. sql.conf 파일 설정

vi /usr/local/radius/etc/raddb/sql.conf

 

sql {

           database = "mysql"

           server = "localhost"            -> mysql 서버 IP

           port = 3306

           login = "radius"               -> mysql 접속 ID

           password = "radpass"          -> mysql 접속 PW

           radius_db = "radius"           -> mysql 접속 DB 이름

}

 

4. MySQL 설정

- radius DB 생성

#mysql -uroot -prootpass

mysql> create database radius;

 

- radius DB에 접속 가능한 사용자 등록

mysql> GRANT ALL PRIVILEGES ON radius.* TO radius@localhost IDENTIFIED BY "radpass"WITH GRANT OPTION;                   -> 사용자 계정 등록

mysql> flush privileges;             -> 권한 로드

 

- radius DB Table 생성

freeradius-1.1.7

cd /usr/share/doc/packages/freeradius/doc/examples/

또는cd /usr/local/src/freeradius-1.1.7/doc/examples/

mysql -uroot -p radius < mysql.sql

Enter Password : ######

-> freeradius-1.1.7를 설치 했다면 해당 디렉토리 경로에 mysql.sql 파일이 있을 수 있다.

   하지만 테스트 한 버전 freeradius-2.1.8에서는 해당 경로에 mysql.sql이 없다.

freeradius-2.1.8

cd /usr/local/radius/etc/raddb/sql/mysql

mysql -uroot -p radius < schema.sql

Enter Password : ######

 

 freeradius-1.1.7 freeradius-2.1.8는 생성되는 table 이름과 수에서도 약간 차이가 있음.

  우선적으로 차이가 나는 부분은 username groupname 필드를 가지고 있는 table인데freeradius-1.1.7은 ‘usergroup’, freeradius-2.1.8은 ‘radusergroup’이라는 table 이름을 가지고

  있음.

 

- Table field에 데이터 입력하기

#mysql -uroot -prootpass

mysql> use radius;

mysql> show tables;

+------------------+

| Tables_in_radius |

+------------------+

| radacct          |

| radcheck         |

| radgroupcheck    |

| radgroupreply    |

| radpostauth      |

| radreply         |

| radusergroup     |

+------------------+

 

mysql> insert into radgroupreply (groupname,attribute,op,value) values ('user','Auth-Type',':=','Local');

mysql> insert into radgroupreply (groupname,attribute,op,value) values ('user','Service-Type',':=','Framed-User');

mysql> insert into radgroupreply (groupname,attribute,op,value) values ('user','Framed-IP-Address',':=','255.255.255.255');

mysql> insert into radgroupreply (groupname,attribute,op,value) values ('user','Framed-IP-Netmask',':=','255.255.255.0');

mysql> insert into radcheck (username,attribute,op,value) values ('test','User-Password',':=','test');

mysql> insert into radusergroup (username,groupname) values ('test','user');

-> local 서버에서 테스트 계정인 test(pw test)를 생성하기 위한 입력 데이터 값

 

5. Radius Server실행

#cd /usr/local/radius/sbin

#./radiusd -X

 

다음과 같은 에러가 발생 시

Fri Feb 19 22:10:46 2010 : Error: Could not link driver rlm_sql_mysql: /usr/lib/libmysqlclient_r.so.15:

cannot restore segment prot after reloc: Permission denied

Fri Feb 19 22:10:46 2010 : Error: Make sure it (and all its dependent libraries!) are in the search path of your system

's ld.

Fri Feb 19 22:10:46 2010 : Error: /usr/local/radius/etc/raddb/sql.conf[22]: Instantiation failed for module "sql"

Fri Feb 19 22:10:46 2010 : Error: /usr/local/radius/etc/raddb/radiusd.conf[649]: Failed to find module "sql".

Fri Feb 19 22:10:46 2010 : Error: /usr/local/radius/etc/raddb/radiusd.conf[641]: Errors parsing authorize section.

Fri Feb 19 22:10:46 2010 : Error: Failed to load virtual server <default>

-> 디버그 모드로 실행 시 밑줄 친 내용 처럼 에러가 발생 할 수 있음.

   SElinux에 의해 실행되지 않는 것으로 SElinux Disable 시킨다.

# vi /etc/sysconfig/selinux

 

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#       enforcing - SELinux security policy is enforced.

#       permissive - SELinux prints warnings instead of enforcing.

#       disabled - No SELinux policy is loaded.

SELINUX=disabled

 

6. Radius Test

#cd /usr/local/radius/bin

#./radtest test test localhost 0 testing123

Sending Access-Request of id 62 to 127.0.0.1 port 1812

        User-Name = "test"

        User-Password = "test"

        NAS-IP-Address = 127.0.0.1

        NAS-Port = 0

rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=62, length=38

        Service-Type = Framed-User

        Framed-IP-Address = 255.255.255.255

        Framed-IP-Netmask = 255.255.255.0

[출처] freeradius 설치|작성자 대장

조회 수 :
153204
등록일 :
2013.04.19
17:05:28 (*.160.42.88)
엮인글 :
http://www.webs.co.kr/index.php?document_srl=19900&act=trackback&key=9ab
게시글 주소 :
http://www.webs.co.kr/index.php?document_srl=19900
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
63 리눅스 tar 압축 백업복원시 소유자 문제해결 admin 2011-12-16 37040
62 스트리밍서버 / 윈도우서버 admin 2011-12-16 37441
61 ftp 파일전송 여러파일을 한번에 통째로 전송 admin 2011-12-16 37530
60 암호 없이 SSH 접속하기 admin 2013-09-05 37825
59 scp 명령어를 이용한 파일 복사 및 전송 admin 2014-10-29 37873
58 seagate HD 시게이트 하드 디스크 A/S 에이에스 기간 조회 및 받는 3가지 방법 admin 2013-12-09 37966
57 리눅스 네트워크 설정 멸령어 Linux admin 2013-04-08 38028
56 SSH Without Authentication Using Key Files (CentOS 5.6) admin 2013-11-22 38317
55 리눅스에서 자바(JDK) 설치하기 admin 2013-04-08 38335
54 Debian CD DVD 다운로드 링크 헤메지말고 바로 다운로드하지요 admin 2012-08-18 38843
53 linux 파티션 디렉토리 용량 확인방법 전체 폴더 크기 사이즈 admin 2012-01-05 40490
52 모든 CPU 벤치마크 수치 admin 2011-12-16 40685
51 scp, ssh, rsync등을 사용할때에 SSH 비밀번호 묻는것 피하기 admin 2012-04-15 40969
50 kali linux 해킹 hacking attack DDOS etc tools admin 2015-06-24 41479
49 리눅스 네트워크 설정 LINUX admin 2011-12-19 41482
48 How to install Java on linux with no Internet connectivity (using local repository) admin 2017-10-01 42057
47 [Linux/SSL] 리눅스 서버에 Apache 2 설치 및 SSL 설정하기(mod_ssl, openssl) admin 2012-04-15 42256
46 How to disable IPv6 in Debian , 리눅스 아이피설정 admin 2011-12-16 44812
45 How to disable IPv6 in Debian Lenny and Squeeze admin 2011-12-29 45068
44 apt-get install linux-image-2.6.26-2-686-bigmem admin 2015-06-27 46942
43 FREE RADIUS 활용및 응용 admin 2013-02-23 46951
42 윈도우 2003 작업 스케줄러 설정 admin 2011-12-16 47135
41 How To Install Java with Apt-Get on Ubuntu 16.04 oracle java admin 2017-10-13 47193
40 Which is better, GCC or Clang? admin 2018-06-13 62887
39 How to install a Debian 9 (Stretch) Minimal Server 데비안 9 설치 admin 2018-06-13 63457
38 useradd Command 리눅스 admin 2017-12-15 63517
37 OpenVPN - Getting started How-To admin 2017-09-20 67226
36 리눅스 부팅시 시작시 프로그램 명령어 실행하기 (Linux Init script) admin 2017-08-30 72963
35 Linux 시스템 백업과 복원 admin 2013-04-04 74181
34 한국인/국내기업은 얼마나 Linux Kernel에 기여할까? admin 2012-04-29 76772