36.4. 유선 네트워크에서 hostapd 를 인증자로 구성
호스트 액세스 포인트 데몬(hostapd) 서비스는 802.1X 인증을 제공하기 위해 유선 네트워크에서 인증자 역할을 할 수 있습니다. 이를 위해 hostapd 서비스에는 클라이언트를 인증하는 RADIUS 서버가 필요합니다.
hostapd 서비스는 통합된 RADIUS 서버를 제공합니다. 그러나 통합 RADIUS 서버는 테스트 목적으로만 사용합니다. 프로덕션 환경의 경우 다양한 인증 방법 및 액세스 제어와 같은 추가 기능을 지원하는 FreeRADIUS 서버를 사용합니다.
hostapd 서비스는 트래픽 플레인과 상호 작용하지 않습니다. 서비스는 인증자 역할을만 합니다. 예를 들어 hostapd 제어 인터페이스를 사용하여 인증 이벤트 결과에 따라 트래픽을 허용하거나 거부하는 스크립트 또는 서비스를 사용합니다.
사전 요구 사항
-
hostapd패키지를 설치했습니다. - FreeRADIUS 서버가 구성되었으며 클라이언트를 인증할 준비가 되었습니다.
프로세스
다음 콘텐츠를 사용하여
/etc/hostapd/hostapd.conf파일을 만듭니다.# General settings of hostapd # =========================== # Control interface settings ctrl_interface=/var/run/hostapd ctrl_interface_group=wheel # Enable logging for all modules logger_syslog=-1 logger_stdout=-1 # Log level logger_syslog_level=2 logger_stdout_level=2 # Wired 802.1X authentication # =========================== # Driver interface type driver=wired # Enable IEEE 802.1X authorization ieee8021x=1 # Use port access entry (PAE) group address # (01:80:c2:00:00:03) when sending EAPOL frames use_pae_group_addr=1 # Network interface for authentication requests interface=br0 # RADIUS client configuration # =========================== # Local IP address used as NAS-IP-Address own_ip_addr=192.0.2.2 # Unique NAS-Identifier within scope of RADIUS server nas_identifier=hostapd.example.org # RADIUS authentication server auth_server_addr=192.0.2.1 auth_server_port=1812 auth_server_shared_secret=hostapd_client_password # RADIUS accounting server acct_server_addr=192.0.2.1 acct_server_port=1813 acct_server_shared_secret=hostapd_client_password이 구성에 사용된 매개변수에 대한 자세한 내용은
/usr/share/doc/hostapd/hostapd.conf예제 구성 파일에서 설명을 참조하십시오.hostapd서비스를 활성화하고 시작합니다.# systemctl enable --now hostapd
문제 해결
hostapd서비스가 시작되지 않으면/etc/hostapd/hostapd.conf파일에서 사용하는 브리지 인터페이스가 시스템에 있는지 확인합니다.# ip link show br0다른 문제의 경우 디버그 모드에서
hostapd를 실행합니다.hostapd서비스를 중지합니다.# systemctl stop hostapd디버그 모드에서 서비스를 시작합니다.
# hostapd -d /etc/hostapd/hostapd.conf-
확인섹션에서 참조된 FreeRADIUS 호스트에서 인증 테스트를 수행합니다.