mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 10:04:19 +02:00
doc/hotspot-to-wpa: RouterOS v7 path syntax
This commit is contained in:
parent
060d12d273
commit
d68958dd77
|
@ -25,7 +25,7 @@ Then install the script:
|
|||
|
||||
Configure your hotspot to use this script as `on-login` script:
|
||||
|
||||
/ ip hotspot user profile set on-login=hotspot-to-wpa [ find ];
|
||||
/ip/hotspot/user/profile/set on-login=hotspot-to-wpa [ find ];
|
||||
|
||||
### Automatic cleanup
|
||||
|
||||
|
@ -36,11 +36,11 @@ access list forever. Install the optional script for automatic cleanup:
|
|||
|
||||
Create a scheduler:
|
||||
|
||||
/ system scheduler add interval=1d name=hotspot-to-wpa-cleanup on-event="/ system script run hotspot-to-wpa-cleanup;" start-time=startup;
|
||||
/system/scheduler/add interval=1d name=hotspot-to-wpa-cleanup on-event="/system/script/run hotspot-to-wpa-cleanup;" start-time=startup;
|
||||
|
||||
And add the lease script to your wpa interfaces' dhcp server:
|
||||
|
||||
/ ip dhcp-server set lease-script=lease-script [ find where name~"wpa" ];
|
||||
/ip/dhcp-server/set lease-script=lease-script [ find where name~"wpa" ];
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
@ -51,8 +51,8 @@ entries are to be added.
|
|||
|
||||
Create hotspot login credentials:
|
||||
|
||||
/ ip hotspot user add add comment="Test User 1" name=user1 password=v3ry;
|
||||
/ ip hotspot user add add comment="Test User 2" name=user2 password=s3cr3t;
|
||||
/ip/hotspot/user/add comment="Test User 1" name=user1 password=v3ry;
|
||||
/ip/hotspot/user/add comment="Test User 2" name=user2 password=s3cr3t;
|
||||
|
||||
Additionally templates can be created to give more options for access list:
|
||||
|
||||
|
@ -66,12 +66,12 @@ Additionally templates can be created to give more options for access list:
|
|||
|
||||
For a hotspot called `example` the template could look like this:
|
||||
|
||||
/ caps-man access-list add comment="hotspot-to-wpa template example" disabled=yes private-passphrase="ignore" ssid-regexp="^example\$" vlan-id=10 vlan-mode=use-tag;
|
||||
/caps-man/access-list/add comment="hotspot-to-wpa template example" disabled=yes private-passphrase="ignore" ssid-regexp="^example\$" vlan-id=10 vlan-mode=use-tag;
|
||||
|
||||
The same settings are available in hotspot user's comment and take precedence
|
||||
over the template settings:
|
||||
|
||||
/ ip hotspot user add comment="private-passphrase=ignore, ssid-regexp=^example\\\$, vlan-id=10, vlan-mode=use-tag" name=user password=v3ry-s3cr3t;
|
||||
/ip/hotspot/user/add comment="private-passphrase=ignore, ssid-regexp=^example\\\$, vlan-id=10, vlan-mode=use-tag" name=user password=v3ry-s3cr3t;
|
||||
|
||||
Usage and invocation
|
||||
--------------------
|
||||
|
|
Loading…
Reference in a new issue