-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time Restriction #555
Comments
I think is better to add repeating job, like repeating restrict peer at 8pm everyday and unrestrict peer at 6am everyday? |
Yes that would work but i don't see time as an option.
Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Donald Zou ***@***.***>
Sent: Saturday, December 14, 2024 1:24:50 AM
To: donaldzou/WGDashboard ***@***.***>
Cc: Charles Stevens ***@***.***>; Author ***@***.***>
Subject: Re: [donaldzou/WGDashboard] Time Restriction (Issue #555)
I think is better to add repeating job, like repeating restrict peer at 8pm everyday and unrestrict peer at 6am everyday?
—
Reply to this email directly, view it on GitHub<#555 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AENSKVNJGBO4M4YP2UQNKCT2FPMMFAVCNFSM6AAAAABTQZ6CY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBSHEZTANBZHE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi! Unfortunately the current version does not have this functionality. But.. we can use
curl --location 'wg.local:10086/api/restrictPeers/wg0' \
--header 'wg-dashboard-apikey: twkl03ZfNz3WMMjsxs1xGXDZ1ruMaN8_0YKmGcDXvFI' \
--header 'Content-Type: application/json' \
--data '{
"peers":[
"Ee3BTE9vFAGgtKkI8d6xLe2wwFPRijnIzZ5bdrCc6Ek="
]
}'
curl --location 'wg.local:10086/api/allowAccessPeers/wg0' \
--header 'wg-dashboard-apikey: twkl03ZfNz3WMMjsxs1xGXDZ1ruMaN8_0YKmGcDXvFI' \
--header 'Content-Type: application/json' \
--data '{
"peers":[
"Ee3BTE9vFAGgtKkI8d6xLe2wwFPRijnIzZ5bdrCc6Ek="
]
}' Save them in a known location. You can do so by running
Then you might ask to choose an editor, Then, we will need to create 2 rules. But before that, you might want to know more about
In your case it would be
Which means, at 8:00 every day, it will run Then save it. It will tells you whether your rules are successfully installed or not. Let me know if you have any questions :) |
@ctv99 Hi! Is this working for you? |
Is there an option to Time Restrict Peer not just Date?
Such as Peer cannot Connect After 8pm But at 6Am they can Connect Again?
The text was updated successfully, but these errors were encountered: