วันศุกร์ที่ 16 ตุลาคม พ.ศ. 2558

Mikrotik Hotspot Freeradius

วิธี set Mikrotik เป็น Hotspot โดยใช้ฐานข้อมูลผู้ใช้จาก Freeradius Server
   โดยที่ Fix ip ของ Mikrotik เป็น 192.168.1.2 ต่อกับ Gateway ip 192.168.1.1
   Freeradius Server ip 192.168.1.1

- ใช้ port 1 เป็นขา gateway ตั้งค่า ip 192.168.1.2/24
   โดยกด IP เลือก Addresses กด + ใส่ Address: 192.168.1.2/24 , Interface:  ether1-gateway




- เพิ่ม Route เพื่อให้ออกเน็ตได้
   โดยกด IP เลือก Routes กด + ใส่ Dst. Address: 0.0.0.0/0 , Gateway: 192.168.1.1 ,
   Check Gateway: ping




- ตั้งค่า DNS
   โดยกด IP เลือก DNS ใส่ Server: 192.168.1.1




- ทดลอง ping ip, host ดูว่าออกเน็ตได้หรือเปล่า
   โดยกด New Terminal แล้วใช้คำสั่ง ping 8.8.8.8 , ping www.google.com




- ตั้งค่า Radius Server
   โดยกด Radius กด + ติ๊กที่ hotspot ใส่ Address: 192.168.1.1 , Secret: รหัสของ Freeradius ,                     Authentication Port: 1812 , Accounting Port: 1813 , Timeout: 300


   กด Incoming ติ๊กที่ Accept ใส่ Port: 3799


   กดแถบ Status ดูถ้ามีค่า Requests และ Accepts แสดงว่า Mikrotik ติดต่อกับ Radius Server ได้ 
   ถ้ามี Timeouts มากให้เพิ่มค่า Timeoute ในแถบ General

   


- ตั้งค่า Hotspot
   โดยกด IP เลือก Hotspot กดแถบ Server แล้วกด Hotspot Setup
   Hotspot Interface: ether2-master-local


   Local Address of Network: 192.168.88.1/24 ติ๊กที่ Masquerade Network


   Address Pool of Network: 192.168.88.10-192.168.88.254


   Select Certificate: none


   IP Address of SMTP Server : 0.0.0.0


   DNS Servers: 192.168.1.1 หรือ 8.8.8.8


   DNS Name: ไม่ต้องใส่


   Name of HotSpot User: admin , Password for the User: ไม่ต้องใส่


   กดแถบ Server Profiles แล้วกดเลือก profile ที่เพิ่มเข้ามาใหม่ (hsprof1)
   แถบ Login ติ๊กที่ HTTP CHAP กับ HTTP PAP
  

   แถบ RADIUS ติ๊กที่ Use RADIUS กับ Accounting , NAS Port Type: 19 (wireless-802.11)





- เสียบสายแลนของคอมพิวเตอร์กับ Mikrotik จะได้ ip 192.168.88.xxx ทดลองเปิดเวปจะเด้งเข้าหน้า        จอ login





เอกสารอ้างอิง
MikroTik's Remote Radius Configuration

ไม่มีความคิดเห็น:

แสดงความคิดเห็น