2020-03-27 21:44:36 +01:00
Use wireless network with daily psk
===================================
2024-03-06 14:30:18 +01:00
[](https://github.com/eworm-de/routeros-scripts/stargazers)
[](https://github.com/eworm-de/routeros-scripts/network)
[](https://github.com/eworm-de/routeros-scripts/watchers)
2024-05-24 20:35:06 +02:00
[](https://mikrotik.com/download/changelogs/)
2024-03-06 14:30:18 +01:00
[](https://t.me/routeros_scripts)
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick& hosted_button_id=A4ZXBD6YS2W8J)
2023-01-10 14:45:27 +01:00
[⬅️ Go back to main README ](../README.md )
2020-03-27 21:44:36 +01:00
2022-02-12 13:05:56 +01:00
> ℹ ️ **Info**: This script can not be used on its own but requires the base
2022-02-11 23:34:39 +01:00
> installation. See [main README](../README.md) for details.
2021-05-03 15:07:50 +02:00
2020-03-27 21:44:36 +01:00
Description
-----------
This script is supposed to provide a wifi network which changes the
passphrase to a pseudo-random string daily.
2021-06-17 15:23:51 +02:00
### Sample notification
2022-10-20 10:46:40 +02:00

2021-06-17 15:23:51 +02:00
2020-03-27 21:44:36 +01:00
Requirements and installation
-----------------------------
2021-02-18 14:52:47 +01:00
Just install this script.
2020-03-27 21:44:36 +01:00
2024-03-05 11:10:24 +01:00
Depending on whether you use `wifi` package (`/interface/wifi` ), legacy
wifi with CAPsMAN (`/caps-man` ) or local wireless interface
(`/interface/wireless` ) you need to install a different script and add
schedulers to run the script:
2020-03-27 21:44:36 +01:00
2024-03-05 11:10:24 +01:00
For `wifi` :
2023-11-14 10:31:40 +01:00
$ScriptInstallUpdate daily-psk.wifi;
/system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.wifi;" start-time=03:00:00;
/system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.wifi;" start-time=startup;
2023-08-08 23:49:02 +02:00
For legacy CAPsMAN:
2020-03-27 21:44:36 +01:00
2021-02-18 14:52:47 +01:00
$ScriptInstallUpdate daily-psk.capsman;
2023-05-31 15:59:07 +02:00
/system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.capsman;" start-time=03:00:00;
/system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.capsman;" start-time=startup;
2020-03-27 21:44:36 +01:00
2023-08-08 23:49:02 +02:00
For legacy local interface:
2020-03-27 21:44:36 +01:00
2021-02-18 14:52:47 +01:00
$ScriptInstallUpdate daily-psk.local;
2023-05-31 15:59:07 +02:00
/system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.local;" start-time=03:00:00;
/system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.local;" start-time=startup;
2020-03-27 21:44:36 +01:00
These will update the passphrase on boot and nightly at 3:00.
Configuration
-------------
The configuration goes to `global-config-overlay` , these are the parameters:
* `DailyPskMatchComment` : pattern to match the wireless access list comment
* `DailyPskSecrets` : an array with pseudo random strings
2023-06-07 14:12:36 +02:00
> ℹ ️ **Info**: Copy relevant configuration from
> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
> your local `global-config-overlay` and modify it to your specific needs.
2024-03-05 11:10:24 +01:00
Then add an access list entry. For `wifi` :
2023-11-14 10:31:40 +01:00
/interface/wifi/access-list/add comment="Daily PSK" ssid-regexp="-guest\$" passphrase="ToBeChangedDaily";
2023-08-08 23:49:02 +02:00
For legacy CAPsMAN:
2023-01-12 23:26:23 +01:00
/caps-man/access-list/add comment="Daily PSK" ssid-regexp="-guest\$" private-passphrase="ToBeChangedDaily";
2023-08-08 23:49:02 +02:00
For legacy local interface:
2020-03-27 21:44:36 +01:00
2022-05-11 10:00:56 +02:00
/interface/wireless/access-list/add comment="Daily PSK" interface=wl-daily private-pre-shared-key="ToBeChangedDaily";
2020-03-27 21:44:36 +01:00
2022-09-23 15:07:30 +02:00
Also notification settings are required for
[e-mail ](mod/notification-email.md ),
2025-03-04 17:21:00 +01:00
[gotify ](mod/notification-gotify.md ),
2023-10-11 07:40:55 +02:00
[trix ](mod/notification-matrix.md ),
[ntfy ](mod/notification-ntfy.md ) and/or
2021-11-16 16:03:43 +01:00
[telegram ](mod/notification-telegram.md ).
2020-03-27 21:44:36 +01:00
---
2023-01-10 14:45:27 +01:00
[⬅️ Go back to main README ](../README.md )
[⬆️ Go back to top ](#top )