To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.
CService: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 24: | Line 24: | ||
=== Commands === | === Commands === | ||
==== setusername ==== | ==== setusername ==== | ||
Sets the UnderNet username | Sets the UnderNet username: | ||
/msg *cservice setusername your_username | |||
/msg *cservice setusername your_username | |||
==== setpassword ==== | ==== setpassword ==== | ||
Sets the UnderNet password. The password is stored securely using AES-256 encryption | Sets the UnderNet password. The password is stored securely using AES-256 encryption: | ||
/msg *cservice setpassword your_password | |||
/msg *cservice setpassword your_password | |||
==== setsecret ==== | ==== setsecret ==== | ||
Sets the 2FA/TOTP secret key. The secret is stored securely using AES-256 encryption | Sets the 2FA/TOTP secret key. The secret is stored securely using AES-256 encryption: | ||
/msg *cservice setsecret your_2fa_secret | |||
/msg *cservice setsecret your_2fa_secret | |||
==== enable2fa ==== | ==== enable2fa ==== | ||
Enables 2FA/TOTP for secure logins | Enables 2FA/TOTP for secure logins: | ||
/msg *cservice enable2fa | |||
/msg *cservice enable2fa | |||
==== disable2fa ==== | ==== disable2fa ==== | ||
Disables 2FA/TOTP | Disables 2FA/TOTP: | ||
/msg *cservice disable2fa | |||
/msg *cservice disable2fa | |||
==== setusermode ==== | ==== setusermode ==== | ||
Sets the user mode prefix for the server connection. Valid options are <nowiki>-x!</nowiki>, <nowiki>+x!</nowiki>, <nowiki>-!+x</nowiki>, or an empty string | Sets the user mode prefix for the server connection. Valid options are <nowiki>-x!</nowiki>, <nowiki>+x!</nowiki>, <nowiki>-!+x</nowiki>, or an empty string: | ||
/msg *cservice setusermode +x! | |||
/msg *cservice setusermode +x! | |||
==== showconfig ==== | ==== showconfig ==== | ||
Displays the current configuration settings | Displays the current configuration settings: | ||
/msg *cservice showconfig | |||
/msg *cservice showconfig | |||
=== Example Usage === | === Example Usage === | ||
1. Set your username: | 1. Set your username: | ||
/msg *cservice setusername MyUser | /msg *cservice setusername MyUser | ||
2. Set your password: | 2. Set your password: | ||
/msg *cservice setpassword MyPassword | /msg *cservice setpassword MyPassword | ||
3. Set your TOTP secret: | 3. Set your TOTP secret: | ||
/msg *cservice setsecret ABCDEFGHIJKLMNOPQRSTUV | /msg *cservice setsecret ABCDEFGHIJKLMNOPQRSTUV | ||
4. Enable 2FA: | 4. Enable 2FA: | ||
/msg *cservice enable2fa | /msg *cservice enable2fa | ||
5. View your current configuration: | 5. View your current configuration: | ||
/msg *cservice showconfig | /msg *cservice showconfig | ||
=== Notes === | === Notes === | ||
* Always generate a secure encryption key (`MASTER_KEY`) before compiling the module. Use the following OpenSSL command: | * Always generate a secure encryption key (`MASTER_KEY`) before compiling the module. Use the following OpenSSL command: | ||
openssl rand -hex 32 | |||
openssl rand -hex 32 | Replace `MASTER_KEY` in the source code with the generated key. | ||
* For changes to take effect, reload the module: | * For changes to take effect, reload the module: | ||
/znc unloadmod cservice | |||
/znc unloadmod cservice | |||
/znc loadmod cservice | /znc loadmod cservice | ||
== See Also == | == See Also == |
Latest revision as of 10:09, 12 January 2025
This is an external module. Please note that it may or may not work with the current release (1.9.1). This module is not included in the default ZNC installation, and you will need to manually compile it before you can load this module. Contact the author if you have any questions, but feel free to ask in #znc on Libera.Chat. Someone might be able to help you there. |
The `CService` ZNC module provides secure login functionality for X on UnderNet, including support for 2FA/TOTP authentication and LoC (Login on Connect). It allows users to configure login details, enable/disable 2FA, and specify user modes. Sensitive data, such as passwords and 2FA secrets, are encrypted using AES-256 encryption for enhanced security.
Getting the Code
The code for this module can be found here.
Compatibility
This module was compiled and tested with ZNC 1.10.
Features
- Secure Login: Authenticate with UnderNet using your username, password, and optional 2FA/TOTP.
- 2FA/TOTP Support: Enhance security by adding time-based one-time passwords.
- LoC (Login on Connect): Log in to UnderNet automatically using the LoC feature.
- Custom User Modes: Set user mode prefixes (-x!, +x!, or -!+x) during server connection.
- Encrypted Credentials: Passwords and 2FA secrets are stored securely using AES-256 encryption.
Usage
Arguments
This user module takes none arguments. No additional arguments are required to load the module. Use commands to configure settings.
Read loading modules to learn more about loading modules.
Commands
setusername
Sets the UnderNet username:
/msg *cservice setusername your_username
setpassword
Sets the UnderNet password. The password is stored securely using AES-256 encryption:
/msg *cservice setpassword your_password
setsecret
Sets the 2FA/TOTP secret key. The secret is stored securely using AES-256 encryption:
/msg *cservice setsecret your_2fa_secret
enable2fa
Enables 2FA/TOTP for secure logins:
/msg *cservice enable2fa
disable2fa
Disables 2FA/TOTP:
/msg *cservice disable2fa
setusermode
Sets the user mode prefix for the server connection. Valid options are -x!, +x!, -!+x, or an empty string:
/msg *cservice setusermode +x!
showconfig
Displays the current configuration settings:
/msg *cservice showconfig
Example Usage
1. Set your username:
/msg *cservice setusername MyUser
2. Set your password:
/msg *cservice setpassword MyPassword
3. Set your TOTP secret:
/msg *cservice setsecret ABCDEFGHIJKLMNOPQRSTUV
4. Enable 2FA:
/msg *cservice enable2fa
5. View your current configuration:
/msg *cservice showconfig
Notes
- Always generate a secure encryption key (`MASTER_KEY`) before compiling the module. Use the following OpenSSL command:
openssl rand -hex 32 Replace `MASTER_KEY` in the source code with the generated key.
- For changes to take effect, reload the module:
/znc unloadmod cservice /znc loadmod cservice
See Also
For more information on UnderNet's Login on Connect (LoC) feature, visit UnderNet LoC.
Enjoy secure and seamless logins with the `CService` ZNC module!