ejabberd 15 allow registration not only from localhost - ejabberd

Hello i'm newbie of ejabberd and i have a problem to solve.
I installed ejabberd 15 on ubuntu (machine1) (my machine has 32 bit and the latest version of ejabberd is not available for my machine) and i cant register user
this is my steps
1) i installed ejabberd and i started the instance
2) i installed a xmpp client (i'm tring with PSI)
3) the registration of new user and the login works perfectly using PSI in local machine
4) i installed PSI in another machine (machine2) and i tried to register a new user but ejabberd says that i havent permission for this operation
5) then i registered a new user using the administration web interface and i tried to login with this new user from the machine2 and now the user can login
Note: the machine1 is behind a nat and i access trought port forwarding configuration (but is't not problem because i repeat the second user can login if registered with the administration web interface)
it would seem that i have to change some parameter in the yaml configuration file of ejabberd but what?
i post the complete configuration file, thanks
### ACCESS RULES
access:
## Maximum number of simultaneous sessions allowed for a single user:
max_user_sessions:
all: 10
## Maximum number of offline messages that users can have:
max_user_offline_messages:
admin: 5000
all: 100
## This rule allows access only for local users:
local:
local: allow
## Only non-blocked users can use c2s connections:
c2s:
blocked: deny
all: allow
## For C2S connections, all users except admins use the "normal" shaper
c2s_shaper:
admin: none
all: normal
## All S2S connections use the "fast" shaper
s2s_shaper:
all: fast
## Only admins can send announcement messages:
announce:
admin: allow
## Only admins can use the configuration interface:
configure:
admin: allow
## Admins of this server are also admins of the MUC service:
muc_admin:
admin: allow
## Only accounts of the local ejabberd server can create rooms:
muc_create:
local: allow
## All users are allowed to use the MUC service:
muc:
all: allow
## Only accounts on the local ejabberd server can create Pubsub nodes:
pubsub_createnode:
local: allow
## In-band registration allows registration of any possible username.
## To disable in-band registration, replace 'allow' with 'deny'.
register:
all: allow
## Only allow to register from localhost
trusted_network:
loopback: allow
## Do not establish S2S connections with bad servers
## s2s:
## bad_servers: deny
## all: allow
## By default the frequency of account registrations from the same IP
## is limited to 1 account every 10 minutes. To disable, specify: infinity
## registration_timeout: 600
##
## Define specific Access Rules in a virtual host.

Related

Can I configure worked EJabberd without using 5269 port? blocked by provider

Is it possible to make ejabberd.yml and ejabberdctl.cfg files to use another ports or except using port 5269?
You can use these steps:
listen:
...
port: 3478
transport: udp
module: ejabberd_stun
port: 3478
module: ejabberd_stun
port: 5349
module: ejabberd_stun
certfile: /etc/ejabberd/server.pem
...
Example:
https://docs.ejabberd.im/admin/configuration/listen/
Your network provider blocks port 5269?
It's the standard port number for XMPP server-2-server connections.
When some user in a remote XMPP server wants to chat with somebody in your ejabberd server, by default they will attempt to connect to your ejabberd on port number 5269, so your ejabberd should be listening in port 5269, and that port should not be blocked... bad luck!
Of course, you can edit that 5269 number in ejabberd.yml, put whatever like 555269, and ejabberd will listen in that different port number... but remote servers will still attempt to contact ejabberd on port 5269, so that connection will fail!
Searching for some way to tell remote XMPP servers to contact you to a different port number, it seems you can set up SRV DNS records when you run s2s over a custom port, see https://prosody.im/doc/s2s and https://prosody.im/doc/dns

Cannot_register user in ejabberd-21 (unknown virtual host)

I'my trying to simply register user using ejabberdctl:
ejabberdctl register admin 100.100.100.100 123456
and receive: unknown virtual host - same for every user.
Configuration:
ejabberd.yml:
hosts:
- "100.100.100.100"
auth_method:
-sql
-external
/etc/hosts
127.0.0.1 100.100.100.100
127.0.0.1 localhost
No errors in log files both in /opt/ejabberd/logs and /var/log/
No errors in debug mode.
ejabberd version - 21.07
I followed your configuration, with only this change (I don't have SQL or extauth configured):
auth_method:
- internal
And it works correctly:
ejabberdctl register admin 100.100.100.100 123456
User admin#100.100.100.100 successfully registered
Can you configure like I do, only internal, and check again?
If it works with internal, then enable only sql. Does it work?
If it works with sql, enable only external. Does it work?
If it works, then enable both sql and external as you desired. Does it work?
ejabberdctl register admin custom_hostname your_custom_password
it works and will create account like
hostname: admin#custom_hostname
password: your_custom_password

Azure Database for MySQL and Azure VM replication connection error

I have provisioned a Azure Database for MySQL instance and
for the purposes of debugging I have added to the rule under the connection security section as below:
Name: allowAll
Start IP: 0.0.0.0
End IP: 247.255.255.255
It does not allow me to specify a port, I have assumed the above rule allows all traffic to flow freely to the Azure Database for MySQL.
I also have an Azure VM which I have created that runs MySQL, I wish to setup replication between the VM and Azure Database for MySQL instance.
Master(VM) ---> Slave (Azure Database for MySQL)
Again for the purposes of testing I have created the following network security group rules for the purposes of debugging only
Inbound security rules:
Priority: 1000
Name: test
Port: Any
Protocol: Any
Source: Any
Destination: Any
Action: Allow
Outbound security rules:
Priority: 1000
Name: test
Port: Any
Protocol: Any
Source: Any
Destination: Any
Action: Allow
To my knowledge the above should eliminate any possibility of the connection being blocked at network level.
When I attempt to start MySQL replication I get the following error
"Last_IO_Errno: 2003
"Last_IO_Error: error connecting to master 'X#X.X.X.X:3306' - retry-time: 60 retries: 1"
Real details switched with X's for security
I have created users on both the MySQL instance with wildcard hostname access and have verified I can connect from my home connection.
On the Azure VM I can run tcpdump and I am able to see traffic flowing to and from the Azure VM to Azure Database like below
"X.X.X.X.3306 > X.X.X.X.28288: Flags [S.], cksum 0x2564 (incorrect -> 0xd59b), seq 4079747372, ack 1378238510, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
14:15:25.762288 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)"
Is anyone able to provide any help here ?

Connect phpMyAdmin with ejabberd server on ec2 ubuntu instance

i successfully configure lamp server, phpmyadmin and ejabberd server on my ec2 Ubuntu instance. Now i want to connect my phpMyAdmin with ejabberd i don't know how to do that please provide some help or some reference. Thanks
change in your ejabberd configuration file-
## MySQL server:
##
odbc_type: mysql
odbc_server: "localhost" #your host ip or domain name
odbc_database: "ejabberddb" # your database name
odbc_username: "root"
odbc_password: "test"
odbc_pool_size: 50
##
## If you want to specify the port:
odbc_port: 3306
for more detail check this link

how to set Anonymous login in ejabberd server in ejabberd.yml

Hi i want to set anonymous login for ejabberd server.I was trying to set it in ejabbedd.yml. This is my config which i was trying with
Anonymous login support:
host_config:
"domain":
auth_method: anonymous
anonymous_protocol: sasl_anon