I really don't know if this is good advice or not (backup your server first), but:
If your server is running Paper (or has a Paper.yml file), line 41 "Perform username validation" could maybe be set to false. I know luckperms needs you to set 'allow invalid usernames (Luckperms config.yml line ~677 to line 681) to true.
# If LuckPerms should allow usernames with non alphanumeric characters.
#
# - Note that due to the design of the storage implementation, usernames must still be 16 characters
# or less.
allow-invalid-usernames: true
The paperyml is lines 40 and 41
unsupported-settings:
perform-username-validation: true
---
Your external server host might also not allow proxy connectors, check the Configuration or Server Settings of your external server to see if there's any options disabling 'Disallowed Proxy Connections"
(I'm in no way qualified to offer advice, just trying to help out a bit, and maybe bump this thread so someone else with an actual idea or experience can help you out!)