Radius Server and Login Page

สำหรับการตั้งค่า Radius Server และ ปรับตั้งค่าหน้า Login

1. Set Radius Server

Service: hotspot = On

Address: (IP ของ Server เช็คในอีเมล์)

Secret: เช็คในอีเมล์ สำหรับ Secret Key

Authentication Port: (Port ของ Server เช็คในอีเมล์)

Account Port: (Port ของ Server เช็คในอีเมล์)

Timeout: 9000Radius >

2. สร้าง Hot Spot Server

IP --> Hotspot --> Server

NAME: ให้เอา MAC Address ของ Interface ที่ต้องการมาใส่ ในกรณีนีนี้คือ bridge_LAN

Interface: เลือก bridge_LAN ที่เรานั้นได้สร้างเอาไว้

Address pool: เลือก pool ตามที่เราสร้างไว้ในขั้นตอน DHCP Server

Profile: default

ในหัวข้อ Server Profiles --> Login

Login: เลือก HTTP PAP

Radius: เลือก Use Radius

ในหัวข้อ Server Profiles --> RADIUS

ติ๊ก Use RADIUS และ

Interim Uptime: 00:01:00

ในหัวข้อ User Profiles --> General

Address Poot: เลือก pool ตามที่เราสร้างไว้ในขั้นตอน DHCP Server

Shared User: ไม่ต้องใส่ ให้เป็นค่าว่าง

3. แก้ไข File alogin.html และ login.html เพื่อให้ microtik ส่งการ Login ด้วย hotspot ไปยัง seara cloud

ให้ Download file สำหรับ Hotspot ตาม Link ด้านล่างและแตก zip file จะได้ file alogin.html และ login.html สำหรับใช้ใน hotspot

  1. ให้แก้ไขไฟล์ alogin.html บรรทัดที่ 3 และ บรรทัดที่ 34 โดยแก้ไขชื่อ domain จาก demo.seara-portal.net ให้ถูกต้องตามที่ได้รับจาก email

alogin.html
<html>
<head>
<meta http-equiv="refresh" content="2" url="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<title>mikrotik hotspot > redirect</title>
<style type="text/css">
<!--
textarea,input,select {
	background-color: #FDFBFB;
	border: 1px #BBBBBB solid;
	padding: 2px;
	margin: 1px;
	font-size: 14px;
	color: #808080;
}

body{ color: #737373; font-size: 12px; font-family: verdana; }

a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 12px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 12px; color: #7A7A7A; }

-->
</style>
<script language="JavaScript">
<!--
    function startClock() {
        $(if popup == 'true')
        open('$(link-status)', 'hotspot_status', 'toolbar=0,location=0,directories=0,status=0,menubars=0,resizable=1,width=290,height=200');
	$(endif)
	location.href = unescape(");
    }
//-->
</script>
</head>
<body onLoad="startClock()">
<table width="100%" height="100%">
<tr>
	<td align="center" valign="middle">
	You are logged in
	<br><br>
	If nothing happens, click <a href="$(link-redirect)">here</a></td>
</tr>
</table>
</body>
</html>
  1. ให้แก้ไขไฟล์ login.html บรรทัดที่ 5 และ บรรทัดที่ 16 โดยแก้ไขชื่อ domain จาก demo.seara-portal.net ให้ถูกต้องตามที่ได้รับจาก email

login.html
<html>
<title>...</title>
<body>
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action=" method="GET">
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="client_ip" value="$(ip)">
<input type="hidden" name="username" value="$(username)">
<input type="hidden" name="nasid" value="$(identity)">
<input type="hidden" name="loginUrl" value="$(link-login-only)">
<input type="hidden" name="linkorig" value="$(link-orig)">
<input type="hidden" name="error" value="$(error)">
<input type="hidden" name="interface" value="$(interface-name)">
<input type="hidden" name="macesc" value="$(mac-esc)">
<input type="hidden" name="dst" value="">
<input type="submit" value="continue">
</form>
<script language="JavaScript">
	document.redirect.submit();
</script></center>
</body>
</html>
  1. นำ file ที่แก้ไขข้อมูลแล้วทั้ง 2 file ใส่ไปที่ Folder hotspot ของอุปกรณ์

File -> Upload--> /flash/hotspot/alogin.html

File -> Upload--> /flash/hotspot/login.html

Last updated