Ejabbed audio/video call is not working on different network - ejabberd

I am using ejabberd for chat and audio/video and implemented from the following URL
https://www.process-one.net/blog/how-to-set-up-ejabberd-video-voice-calling/
Audio-video calling is working in the same network but when both android app using different networks then the call is connecting...

firstly configure listener ports of TURN STURN server and give the public ip
question is where is public ip comes from firstly you need to configure your own TURN sever or you can purchase that if you configure your own server this is you can do
Setup up your own TRUN server
deploy this server and use this ipv4 ip in your ejabberd listener config
This is my STUN/TURN configuration in ejabberd.yml:
port: 3478
transport: udp
use_turn: true
turn_ip: "212.83.142.6"
auth_type: user
auth_realm: "im.silverpeas.net"
module: ejabberd_stun
port: 3478
use_turn: true
turn_ip: "212.83.142.6"
auth_type: user
auth_realm: "im.silverpeas.net"
module: ejabberd_stun

Related

How to pass dhcp details of my local network in my vagrant file

I have a vagrant file, where the IP of my virtual box is hardcoded.
# The IP address of the first server
primary_ip = "172.17.8.101"
I wanted to dynamically assign the ip based on my local network (corporate network).
In vagrant documentation, I see we can use
The easiest way to use a private network is to allow the IP to be assigned via DHCP.
Vagrant.configure("2") do |config|
config.vm.network "private_network", type: "dhcp"
end
https://www.vagrantup.com/docs/networking/private_network.html
In the same vagrant file, during the configuration I see that the hardcoded ip is referred. Now since, I am using the 'type: dhcp', how can I pass the IP details for the below configuration?
host.vm.provision :shell, inline: %Q|echo 'export ETCD_AUTHORITY="#{primary_ip}:2379"' >> /home/vagrant/.profile|
I have used the below code snippet so that the virtualbox is depends on the host network to get IP address.
config.vm.network "public_network",
use_dhcp_assigned_default_route: true, bridge:
While running my vagrant file, I had the below bridged network interfaces. To auto select the network interface used the below code snippet.
Available bridged network interfaces:
1) Intel(R) 82579LM Gigabit Network Connection
2) VMware Virtual Ethernet Adapter for VMnet1
3) VMware Virtual Ethernet Adapter for VMnet8
code snippet.
config.vm.network "public_network", bridge: "Intel(R) 82579LM Gigabit Network Connection"

how to create multiple instances of eureka services registered into eureka service registry?

I have created eureka service registry and registered services into that. Currently only one instance of a service is running. How to add multiple instances of a same service? I am developing standalone application. And I am accessing services through Rest Template.I am following https://spring.io/guides/gs/service-registration-and-discovery/
If you aim to run multiple instances of one service on a same host, you must:
configure Eureka instance-id with a random number
configure the service use a random port number
These two must be configured individually, e.g.
eureka:
instance:
instance-id: ${spring.cloud.client.hostname}:${spring.application.name}:${spring.application.instance_id:${random.value}}
and
server:
port: 0
Each instance would need to have a unique instanceId, normally configured in application.yml using:
...
eureka:
instance:
metadataMap:
instanceId: ${spring.application.name}:${server.port}
...
Adding the port to the instanceId allows to run multiple instances in the same host.
I have also seen adding a random number instead of the port the instance listens on.
I blogged about service registration and discovery using Jersey, Spring, Eureka, Ribbon and Feign with accompanying source code at http://tech.asimio.net/2016/11/14/Microservices-Registration-and-Discovery-using-Spring-Cloud-Eureka-Ribbon-and-Feign.html
And more recently blogged about how to register and discover multiple versions of a service using Eureka and Ribbon at http://tech.asimio.net/2017/03/06/Multi-version-Service-Discovery-using-Spring-Cloud-Netflix-Eureka-and-Ribbon.html.
You will definitely need another instance of eureka once you have that here is the official spring-cloud documentation on eureka peer awareness.
In short all you need to do is make them aware of each other by adding the info about each other in their respective application.yml. Hope this helps. Read the doc to learn in detail.
---
spring:
profiles: peer1
eureka:
instance:
hostname: peer1
client:
serviceUrl:
defaultZone: http://peer2/eureka/
---
spring:
profiles: peer2
eureka:
instance:
hostname: peer2
client:
serviceUrl:
defaultZone: http://peer1/eureka/
Couple of other links to learn about Eureka github Issue, Understanding Spring Cloud Eureka Server self preservation and renew threshold. Hope this helps.

Configuring nginx as a tcp proxy for ejabberd

I am trying to configure nginx as a tcp proxy for ejabberd.
The nginx configuration for tcp proxying is as shown below
stream{
upstream ejabberd-servers{
server ejabberd:5222;
}
server{
listen 5222;
proxy_pass ejabberd-servers;
}
}
The ejabberd server is the ejabberd server node name. Since this is done in a docker environment.
When I connect to nginx using smack client library, I get the error is SOCKS5 socket fail.
When I try connection using SOCKS4, I get Servers response VN 60
The reason I am trying to do so is because I do not want to expose ejabberd directly to the Internet. I need to have a proxy to load balance connections and also prevent DDos attacks.
Setting up ejabberd for Internet is nicely explained here.
[how to open ejabberd server to public
Has anybody done so successfully?

How to configure web administration module in ejabberd (2.1.x)?

Hii All Thanks for viewing this issue please help me i am trying to configure ejabberd from last 3 days but still not having any solution i added
these code in ejabberd.cfg
{hosts, ["localhost","server.mobulous.in"]}.
{acl, admin, {user, "admin", "server.mobulous.in"}}.
is this a issue of server port because i install zpanel on my vps server and its running on this ip http://119.18.63.178/
So do i need to change server.mobulous.in to this IP?
and also i am not able to access this and this
http://119.18.63.178:5280/admin
http://server.mobulous.in:5280/admin
Help me please i am new to vps and dont know to much
Thanks in advance
[root#server ~]# tail /var/log/ejabberd/ejabberd.log
I(<0.465.0>:ejabberd_listener:166) : Reusing listening port for 5222
=INFO REPORT==== 2014-03-21 13:27:39 ===
I(<0.466.0>:ejabberd_listener:166) : Reusing listening port for 5269
=INFO REPORT==== 2014-03-21 13:27:39 ===
I(<0.467.0>:ejabberd_listener:166) : Reusing listening port for 5280
=INFO REPORT==== 2014-03-21 13:27:39 ===
I(<0.36.0>:ejabberd_app:72) : ejabberd 2.1.13 is started in the node ejabberd#server
"Hosts" in ejabberd
The hosts configuration clause in ejabberd has unfortunate name as it really denotes XMPP domains your server hosts, not the name (or IP address) of the machine it's running on. So if your users will have JIDs of the form sismaster#server.mobulous.in, then you only need to have server.mobulous.in in the hosts clause.
Note that if your XMPP domain is mobulous.in you'll have to properly setup DNS SRV records for your server so that records for mobulous.in point to server.mobulous.in.
Web administration interface in ejabberd
In order for web administration interface to work on a certain port, the web_admin module has to be enabled in the configuration of that port's listener.
For instance, in order to have web admin interface served on 5280 you need to have something like this in your configuration file:
{5280, ejabberd_http, [web_admin]},
I've recently helped someone on the ejabberd mailing list with the similar problem; you can read my rather extensive message here.

windows 7 firewall blocks connection to named sql instance

I want to connect to a named instance of sql server wich runs on a cluster. When I disable the firewall on my windows 7 client machine, I can connect. However, when I activate the firewall, the named instance cannot be found. A named instance of a different server, not on a cluster, can be connected with the client firewall on.
How can I setup my client firewall so I can connect to the named instance that runs on a cluster with my firewall enabled?
Note: What I can do is to disable firewall, connect to the named instance and re-enable the firewall again. After that the connection to the named instance works fine.
This answer is based on you having Windows 2008 R2 on your SQL Server
Open SQL Server Configuration Manager
SQL Server Network Configuration
Protocols for *named_instance*
IP Addresses
Delete 0 from TCP Dynamic Ports else it won't work (you might as well switch the firewall off) and put an unused port number in TCP Port, eg 7200
Repeat the above line all down your list of IPs until you reach the bottom.
Click OK
Add some rules:
Open firewall from Control Panel --> Advance Settings
Inbound rules --> New Rule
Name: Native SQL Server (TCP 1433)
Protocol: TCP
Port: 1433
Name: My Instance SQL Server (TCP 7200)
Protocol: TCP
Port: 7200
Name: SQL Server (UDP 1434)
Protocol: UDP
Port: 1434
REBOOT!!! (or restart the sql services)
Management Studio on your PC should now be able to access the new instance of the database on the server (assuming you don't have firewall restrictions on your own machine)
Try to open ports 445 and if you also need TCP/UDP connections to Sql Server - 1433, 1434
I had exactly the same problem.
I checked the Windows Firewall Log under %systemroot%\system32\logfiles\firewall\pfirewall.log and saw that UDP port 1434 was blocked:
2014-05-14 10:44:44 DROP UDP 12.121.12.121 13.131.131.131 1434 62370 168 - - - - - - - RECEIVE
To connect to a named instance that runs on a cluster you need to open the UDP port 1434 in your local windows firewall.
Open "Windows Firewall with Advanced Security". ("Run as administrator" could help)
Go To "Inbound Rules".
On the actions menu on the right click "New Rule".
Select "Custom", click next until you are on step "Protocol and Ports".
On "Protocol type" select "UDP".
On "Remote port" select "Specific ports" and write 1434.
Click next until you reach step "Profile". I choose just "Domain" so that this rule only applies in the intranet of the company I worked for.
Click next and give it a meaningful name
Click finish and you are done.