วันอาทิตย์ที่ 18 ตุลาคม พ.ศ. 2558

Mikrotik Hotspot Freeradius config file

- Port ether2 ip 192.168.1.2/24 ต่อกับ Gateway 192.168.1.1
- Port ether3 ip 10.0.1.1/24
- แจกไอพี 10.0.1.10 - 10.0.1.250
- DNS 192.168.1.1 , 8.8.8.8
- เรียกใช้ฐานข้อมูลผู้ใช้จาก Radius Server 192.168.1.1 secret = testing123

/ip hotspot profile
add hotspot-address=10.0.1.1 login-by=http-chap,http-pap name=hsprof1 \
    use-radius=yes
/ip pool
add name=hs-pool-3 ranges=10.0.1.10-10.0.1.250
/ip dhcp-server
add address-pool=hs-pool-3 disabled=no interface=ether3 lease-time=1h name=\
    dhcp1
/ip hotspot
add address-pool=hs-pool-3 disabled=no interface=ether3 name=hotspot1 \
    profile=hsprof1
/tool user-manager customer
set admin access=\
    own-routers,own-users,own-profiles,own-limits,config-payment-gw
/ip address
add address=192.168.1.2/24 comment=WAN interface=ether2 network=192.168.1.0
add address=10.0.1.1/24 comment=LAN interface=ether3 network=10.0.1.0
/ip dhcp-server network
add address=10.0.1.0/24 comment="hotspot network" gateway=10.0.1.1
/ip dns
set servers=192.168.1.1,8.8.8.8
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
    "place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    src-address=10.0.1.0/24
/ip hotspot user
add name=admin
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1
/radius
add address=192.168.1.1 secret=testing123 service=hotspot timeout=2s
/radius incoming
set accept=yes
/system clock
set time-zone-name=Asia/Bangkok
/system lcd
set contrast=0 enabled=no port=parallel type=24x4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set ether1 disabled=yes display-time=5s
set ether2 disabled=yes display-time=5s
set ether3 disabled=yes display-time=5s
set ether4 disabled=yes display-time=5s
set ether5 disabled=yes display-time=5s
/tool user-manager database
set db-path=user-manager




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

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