What is a 2FA (Two Factor Authentication) Plugin in Minecraft?
A 2FA (Two Factor Authentication) plugin in Minecraft is an essential security tool for server administrators. It adds a critical second layer of security, requiring staff to authenticate with an additional method, typically a mobile device, after entering their password. This ensures that even if a password is compromised, unauthorized users cannot access sensitive server commands or OP privileges.
Why is 2FA Guard the best 2 Factor Authentication plugin for Minecraft?
2FA Guard is not just a plugin; it's a comprehensive security system for Minecraft servers. Here's why it stands out:
Advanced Admin-Level Security: 2FA Guard is uniquely designed for server admins. It prevents unauthorized access to powerful commands, even if an intruder has acquired staff permissions or OP status. This ensures your server remains secure against unauthorized or malicious access.
Discord Integration for Enhanced Control: Integration with Discord adds another layer of security. Admins can approve or deny 2FA registration requests directly through Discord, ensuring only verified staff members can set up 2FA.
Customizable Command Blocking: The plugin allows admins to define specific commands that can't be executed without 2FA verification, even if the user has the necessary permissions.
Smart IP Recognition: Users won't need to verify their identity repeatedly from the same IP within a set period, thanks to the configurable relog time feature.
Robust Plugin Protection: 2FA Guard is designed to resist being disabled through common methods such as Plugman, ensuring continuous protection.
User-Friendly Configuration: The plugin offers a seamless configuration experience, allowing for personalized settings like issuer name in the authenticator app, font sizes on QR codes, and custom texts.
Authentication Timeout: Gives users 2 minutes (configurable) to enter the code from their mobile authenticator app. If they do not succeed in authenticating, they will be kicked from the server.
Bungeecord & Velocity support: Ensure no one can bypass the 2FA by switching servers. Authenticating on one server, will automatically authenticate you on the other servers. NOTE: For Velocity download this jar, and place it within your velocity plugins directory.
Secure your Minecraft server with these key features:
Mandatory 2FA for All OP Accounts: To ensure maximum security, all OP accounts are required to set up 2FA.
Configurable for Non-OP Accounts: Choose whether non-OP accounts need 2FA, based on specific permissions.
Comprehensive Activity Control: Before setting up 2FA, users are restricted from a wide range of actions, including chatting, moving, command execution, and more, to prevent any unauthorized actions.
How to Enable and Set Up 2FA on Your Minecraft Server with 2FA Guard
Install 2FA Guard: Download and install the plugin on your server and optionally your Bungeecord/Velocity server.
Configure Plugin: Set your preferences in the configuration file, like issuer name and command restrictions.
Instruct Staff: Notify staff about 2FA and guide them to start with /2fa setup in the server chat.
Scan QR Code: Staff will see a QR code in-game. They should scan it with a mobile authenticator app.
Enter Verification Code: Staff enter the code from their app into Minecraft using /2fa <code>.
Complete Setup: After entering the correct code, 2FA is activated for their account.
Ongoing Use: For future logins, staff will enter a new code from their authenticator app
Watch the following video for a better understanding on how 2FA Guard works:
For a modest price, 2FA Guard offers unmatched security for your Minecraft server. Its unique features like Discord approval, tamper resistance, and safeguarding against critical commands are not offered by any other plugin in the market. This small investment can save you from significant potential losses (hundreds, if not thousands of dollars in some cases), making 2FA Guard a smart, essential addition to your server's defense strategy.
Configuration
2FA Guard allows for extensive customization to adapt to your server. Below are the configuration files shipped with 2FA Guard.
If you need any help regarding setting up the plugin, do not hesitate to contact me on Discord.
Code (YAML):
[/SIZE
][/SIZE
] issuer: 'PurplePrison'
# Will be shown in the authenticator app enter_type: 'chat'
# 'chat' or 'command', Should the code be entered via chat, or /2fa <code> authentication_timeout_enabled: true
authentication_timeout: 120
# In seconds, how long the user has to authenticate until being kicked bungeecord_sync: false
# Should the 2FA be synced across the bungeecord network optional_enabled: false
# Enable optional 2FA, if enabled, users can choose to enable 2FA. This is not recommended optional_permission: '2fa.optional'
# Permission required to enable optional 2FA general_blocked_commands: # Commands that are blocked for everyone, this is to prevent reloading and potentially bypassing the 2FA -
"plugman disable 2FA" -
"plugman reload 2FA" -
"plugman unload 2FA" -
"plugman restart 2FA" op_requires_2fa: true
# Does OP require 2fa non_op_requires_2fa: true
# Does non-OP require 2fa, based on the permission below non_op_requires_permission: '2fa.required'
discord_approval: true
# Does discord approval need to be enabled (External approval) relog_time: 30
# In seconds, how long u can join without having to re-authenticate (On the same IP) save_relog_time: true
# Should the relog time be saved, or should it be reset on every restart map:
font_size: 10
top_text: "Scan the QR code" bottom_text: "from a mobile device" name: "&c&l2FA Code" lore: | &7Scan the QR code from a mobile device &7to enable 2FA on your account &f%code% regular_user_blocked_actions: # User is not OP or have the specified required 2FA permission commands: true
command_list: - 'dupeip'
- 'history'
- 'lp'
- 'luckperms'
- 'essentials:'
- 'whois'
- 'op'
- 'deop'
- 'ban'
- 'unban'
- 'kick'
- 'mute'
- 'unmute'
- 'tempban'
- 'tempmute'
- 'banip'
- 'unbanip'
- 'banlist'
not_setup_blocked_actions: # User is required to have 2FA but has not set it up yet receive_chat: true
# Requires ProtocolLib chat: true
commands: true
command_list: - '*'
movement: true
dropping_items: true
picking_up_items: true
holding_items: true
interacting: true
block_breaking: true
block_placing: true
inventory_click: true
no_code_blocked_actions: # User is required to have 2FA, has set it up, but is required to enter their code receive_chat: true
# Requires ProtocolLib chat: true
commands: true
command_list: - '*'
movement: true
dropping_items: true
picking_up_items: true
holding_items: true
interacting: true
block_breaking: true
block_placing: true
inventory_click: true
[SIZE=4
][SIZE=4
][/SPOILER
]
[SPOILER=
"database.yml"] [code=YAML]storage: yml
# Do not edit the fields below if you use yml host: localhost
port: 3306
database: database
user: username
password: password
ssl: false
Code (YAML):
token: token
notify_channel: 0
[/SIZE
] notify_message: '
{"type": "rich",
"title": "%player% requested 2FA access",
"description": "@everyone %player% has attempted to enable 2FA, please verify them by pressing the ✅ emoji",
"color": 123456,
"thumbnail": {"url": "https://www.spigotmc.org/data/resource_icons/114/114896.jpg?1706976366",
"height": 0,
"width": 0
}}'
attempt_disable: '
{"type": "rich",
"title": "WARNING! %player% tried to disable 2FA",
"description": "@everyone %player% has attempted to disable the 2FA, Please take immediate action!",
"color": 16711680,
"thumbnail": {"url": "https://www.spigotmc.org/data/resource_icons/114/114896.jpg?1706976366",
"height": 0,
"width": 0
}}'
[SIZE=4
]
Code (Text):
# Do not edit this file, it's used for the plugin internally
maps: []
Code (YAML):
already_in_set_up: '&cYou are already in the setup process!'
already_requested: '&cYou have already requested 2FA, please wait for approval!'
already_set_up: '&cYou have already set up 2FA!'
approval_required: '&cAnother staff member needs to approve your 2FA request!'
approved: '&aYour 2FA request has been approved, you can now set up 2FA!'
authentication_required: '&cYou need to authenticate yourself before doing this, please
type your 2FA code in chat!'
cancelled: '&cYou have cancelled the setup!'
code_invalid: '&cThe code you have entered is invalid!'
cooldown: '&cPlease wait a little before setting up again!'
help: |-
&7&m
--------------------------
&a&l2FA Help
&7&m
--------------------------
&a/2fa setup &7- &fSet up 2FA
&aUse your device to scan the QR code
&a/2fa help &7- &fShow this message
&7&m
--------------------------
no_console: '&cYou can''t use this command as console!'
no_maps_available: '&cThere are
no maps available at the moment, please try again
later!'
no_permission: '&cYou don''t have permission to do this!'
setup_finished: '&aYou have successfully set up 2FA!'
setup_required: '&cYour account needs to be protected with 2FA before doing this!'
setup_started: |-
&aPlease scan the QR code with your device using Google Authenticator or Authy!
Or type the code &f
%code% &ain your authenticator app! verified: '&aYou have successfully verified your account!'
welcome_back: '&aWelcome back, you''ve relogged and are now authenticated!'
authentication_removed: '&aYou have successfully removed your authentication!'
authentication_removed_other: '&AYou have successfully removed the authentication
of &f
%player%&A!' player_doesnt_have_2fa: '&cThis player doesn''t have 2FA enabled!'
no_authentication_required: '&cYou don''t need to authenticate yourself!'
authentication_took_too_long: '&cYou took too long to authenticate yourself!'
Code (YAML):
unauthenticated:
commands: true
command_list: - server