For enabling Hotspot on MikroTik it is necessary to configure network interfaces and run the commands:
[admin@MikroTik] ip hotspot> setup
Select interface to run Hotspot on
hotspot interface: ether2
Add hotspot authentication for existing interface setup?
interface already configured: yes
Use SSL authentication?
use ssl: no
Use transparent web proxy for hotspot clients?
use transparent web proxy: no
Use local DNS cache?
use local dns cache: no
DNS name of local hotspot server
dns name: 192.168.0.1
Select another port for (www) service
port 80 is used by www service, select some other port for this service
another port for service: 8081
Create local hotspot user
name of local hotspot user: admin
password for the user: admin
[admin@MikroTik] ip hotspot>
For configuring it to work with a RADIUS server run the commands:
[admin@MikroTik] ip hotspot> aaa set use-radius=yes accounting=yes
[admin@MikroTik] radius> add service=hotspot address=10.1.2.105 secret=secret
authentication-port=1812 accounting-port=1813
For enabling DHCP server run the commands:
[admin@MikroTik] ip dhcp-server> setup
Select interface to run DHCP server on
dhcp server interface: ether2
Select network for DHCP addresses
dhcp address space: 192.168.0.0/24
Select gateway for given network
gateway for dhcp network: 192.168.0.1
Select pool of ip addresses given out by DHCP server
addresses to give out: 192.168.0.2-192.168.0.254
Select DNS servers
dns servers: 10.1.2.5
Select lease time
lease time: 3d
[admin@MikroTik] ip dhcp-server>
Also it is necessary to enable caching DNS server by using the commands:
[admin@MikroTik] ip dns> set primary-dns=10.1.2.5
[admin@MikroTik] ip dns> set allow-remote-requests=yes
As a result of these settings on connecting a user via wireless network it is automatically given out (via DHCP) an IP address, default gateway, DNS server. At that by default all packets from a user are forwarded to the MikroTik authorization page:
Post a Comment