Lan to lan

Hi

I want to make Demo application work from one lan to another lan over internet. I ve setup the openfire server in a public ip and using the stun server as stun.xten.net. when two users are inside the same lan, it is working fine but when one user is in one lan and another user is different lan, it is not working. Negotiation is failing. So can u please help me if u ve solved that problem.

any suggestion will b appreciated.

sorry for my english.

thanks in advance

hi Amitav,

well, i think it’s not Smack’s problem, i think you should check your router.

-rosen jiang

Hi rosen jiang,

Thanks for your reply. I ve setup my openfire 3.4.1 server in a public ip and this server doesn’t ve any firewall or something. That is completely out of local lan. that system is having public ip. then how the router will create the problem ? Can you please help me out to solve this problem.

Any advice will be appreciated.

Thanks and Regards

Amitav

Hi ,[Amitav Mohanty|~17733] ,

I have the same problem with you .I also want to konw the reason.

If you solve the problem , please tell me !!!Thank you very much!!!

Hello all,

Can you please check your LAN firewalls and router if they don’t block UDP Traffic.

You MUST enable Media Proxy Service in OpenFire.

Anyway, if you are behind 2 different LANs and they don’t block UDP, you should be able to talk direct lan-to-lan.

Best Regards,

Thiago

Hi, barata7

Thank you for your replay!

I am sure that the 2 clients are not behind any firewalls, and I also enable Media Proxy Service in OpenFire.But I can’t connect with each other,when the 2 clients behind two deffient LAN.

Here is the detail message:

The STUN problem of Openfire<!–

@page

P { margin-bottom: 0.21cm }

A:link

–>

I
am now encountering a problem, that is
:
I deployed the
Openfire server(version 3.3.0) in the Internet, which has two public
IP addresses, then I deployed two JingleDemo clients(JingleDemo is a
demo in smackx-jingle.jar) in two different private networks, both
are behind a NAT device. I want to test the P2P phone call work
between the two Jingledemo clients, whenever I set the Openfire
configuration with the Media proxy and the STUN enabled or not, the
two clients can never establish the communication. I analysed the
debug information which shows that the STUN enabled or not has no
effect, it just shows the Media proxy information, STUN seems never
work.

And more.
1.
I have loaded the JMF native libs.
2. All the firewalls on the
server machine and the client machine are closed.
3. The server OS
is WinfdowsXP or Linux, the Clients OS are all WindowsXP.
4. The
client side NAT devices both are Port Restricted Cone NAT.

5.The version of Jstun.jar in openfire sever is 0.6.1.And the version of
Smackx-Jingle.jar in client is 3.0.4.

I
used other commercial IM system in the same environment, they can
talked to each other.

And
I also test the openfire3.3.3 and Spark2.5.7 in the same environment,
they also can’t establish the communication. The messages told that
session closed, and this problem may be caused by your firewall. But
I has been closed the firewall.

Because
the STUN Server seems never work, so I used Jstun.jar version 0.7.0
beta3 instead of version 0.6.1. But when I set the Openfire
configuration with STUN, there is something wrong, it can’t work.
The message is that the stop
method(smackx-jingle/de/javawi/jstun/demo/stunserver.class) can’t
find.

And
I also did those tests as follows.

One JingleDemo client is
deployed in the Internet,just in the same environment with the
Openfire server and having a public IP address, while the other
JingleDemo client is deployed in one of the two private networks and
having a private IP address. They can talk to each other no matter
who launchs the call first and whenever the server side Media Proxy
or STUN is enabled or not.
And the JingleDemo client in every
private network can make a call with the other JingleDemo client in
Internet.

Here
is the newly test JingleDemo client debug information for two clients
in two different private networks (phone call not
established):

NOTE:
Openfire server Media proxy enabled
Openfire server STUN
enabled

One
client debug information:

Initialized

1

1

Initializing…Resolved

Listening
for ECHO: 172.19.9.109:14806

C:
/172.19.9.109|/172.19.9.109 p:2195

Service
listing

Initializing…Resolved

UpdatePacketListener

Jingle:
<iq id=“HX7n7-8"
to="bb$scm.net.cn@202.115.143.185/Smack"
from="ll@202.115.143.185/Smack” type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="bb$scm.net.cn@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“transport-info” sid=“5934709060446387553”><content
name=‘Audio-Content’><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="172.19.209.239"
port=“17622” network=“0” username="1"
password=“6523048689249463005” preference="2195"
type=“prflx”/></transport></content></jingle></iq>

0

Jingle:
<iq id=“HX7n7-9"
to="bb$scm.net.cn@202.115.143.185/Smack"
from="ll@202.115.143.185/Smack” type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="bb$scm.net.cn@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“transport-info” sid=“5934709060446387553”><content
name=‘Audio-Content’><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="202.115.143.185"
port=“13226” network=“0” username="1"
password=“7089622262738632148” preference="0"
type=“relay”/></transport></content></jingle></iq>

Jingle:
<iq id=“HX7n7-7"
to="bb$scm.net.cn@202.115.143.185/Smack"
from="ll@202.115.143.185/Smack” type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="bb$scm.net.cn@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action="description-info"
sid=“5934709060446387553”><content
name=‘Audio-Content’><description
xmlns=“http://jabber.org/protocol/jingle/description/audio
><payload-type id=“3” name="gsm"
channels=“1” clockrate=“0” /><payload-type id=“4” name=“g723” channels="1"
clockrate=“0” /><payload-type id="0"
name=“PCMU” channels=“1” clockrate=“16000”
/></description></content></jingle></iq>

Jingle:
<iq id=“HX7n7-10"
to="bb$scm.net.cn@202.115.143.185/Smack"
from="ll@202.115.143.185/Smack” type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="bb$scm.net.cn@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“content-accept” sid=“5934709060446387553”><content
name=‘Audio-Content’><description
xmlns=“http://jabber.org/protocol/jingle/description/audio
><payload-type id=“3” name="gsm"
channels=“1” clockrate=“0”
/></description></content></jingle></iq>

BS:gsm

1

2

3

4

5

6

7

8

9

ADDED
Valid Cand: 202.115.143.185:13226

Relay
Type

Relay
Type

Jingle:
<iq id=“HX7n7-11"
to="bb$scm.net.cn@202.115.143.185/Smack"
from="ll@202.115.143.185/Smack” type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="bb$scm.net.cn@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“session-accept” sid=“5934709060446387553”><content
name=‘Audio-Content’><description
xmlns=“http://jabber.org/protocol/jingle/description/audio
><payload-type id=“3” name="gsm"
channels=“1” clockrate=“0”
/></description><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="202.115.143.185"
port=“12856” network=“0” username="1"
password=“3232088990319908255” preference="0"
type=“relay”/></transport></content></jingle></iq>

Relay
Type

Jingle:
<iq id=“HX7n7-13"
to="bb$scm.net.cn@202.115.143.185/Smack"
from="ll@202.115.143.185/Smack” type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="bb$scm.net.cn@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action="transport-accept"
sid=“5934709060446387553”><content
name=‘Audio-Content’><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="202.115.143.185"
port=“12856” network=“0” username="1"
password=“3232088990319908255” preference="0"
type=“relay”/></transport></content></jingle></iq>

Cand:
202.115.143.185

Relay
Type

SET
ACTIVE

Transport
stabilished

Relay
Type

triggerTransportEstablished
172.19.9.109:12856|202.115.143.185:13226

Relay
Type

Relay
Type

Relay
Type

Relay
Type

Relay
Type

org.jivesoftware.smack.XMPPConnection@789144
202.115.143.185: 12030->14192

Track
0 is set to transmit as:

gsm/rtp,
8000.0 Hz, Mono, FrameSize=264 bits

Created
RTP session
at 12030 to: 202.115.143.185 14192



The
other client debug information:

Initialized

1

1

Initializing…Resolved

C:
/172.19.209.239|/172.19.209.239 p:2195

Listening
for ECHO: 172.19.209.239:17570

Service
listing

Initializing…Resolved

UpdatePacketListener

Jingle:
<iq id=“H6oyy-8” to="ll@202.115.143.185/Smack"
from="qq@202.115.143.185/Smack" type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="qq@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“transport-info” sid=“7558319155648544293”><content
name=‘Audio-Content’><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="172.19.9.109"
port=“11052” network=“0” username="1"
password=“7930348670553777584” preference="2195"
type=“prflx”/></transport></content></jingle></iq>

Jingle:
<iq id=“H6oyy-9” to="ll@202.115.143.185/Smack"
from="qq@202.115.143.185/Smack" type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="qq@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“transport-info” sid=“7558319155648544293”><content
name=‘Audio-Content’><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="202.115.143.185"
port=“18568” network=“0” username="1"
password=“7428074536771152777” preference="0"
type=“relay”/></transport></content></jingle></iq>

Jingle:
<iq id=“H6oyy-10” to="ll@202.115.143.185/Smack"
from="qq@202.115.143.185/Smack" type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="qq@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“content-accept” sid=“7558319155648544293”><content
name=‘Audio-Content’><description
xmlns=“http://jabber.org/protocol/jingle/description/audio
><payload-type id=“3” name="gsm"
channels=“1” clockrate=“0”
/></description></content></jingle></iq>

0

BS:gsm

1

2

3

4

5

6

7

8

9

ADDED
Valid Cand: 202.115.143.185:18568

Jingle:
<iq id=“H6oyy-11” to="ll@202.115.143.185/Smack"
from="qq@202.115.143.185/Smack" type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="qq@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action="transport-accept"
sid=“7558319155648544293”><content
name=‘Audio-Content’><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="202.115.143.185"
port=“10038” network=“0” username="1"
password=“1317316830380645295” preference="0"
type=“relay”/></transport></content></jingle></iq>

Cand:
202.115.143.185

Relay
Type

SET
ACTIVE

Transport
stabilished

Relay
Type

triggerTransportEstablished
172.19.209.239:10038|202.115.143.185:18568

Relay
Type

Relay
Type

Relay
Type

Relay
Type

Relay
Type

org.jivesoftware.smack.XMPPConnection@1833955
202.115.143.185: 12114->16978

Track
0 is set to transmit as:

gsm/rtp,
8000.0 Hz, Mono, FrameSize=264 bits

Created
RTP session
at 12114 to: 202.115.143.185 16978

Jingle:
<iq id=“H6oyy-12” to="ll@202.115.143.185/Smack"
from="qq@202.115.143.185/Smack" type=“set”><jingle
xmlns="http://jabber.org/protocol/jingle"
initiator="qq@202.115.143.185/Smack"
responder="ll@202.115.143.185/Smack"
action=“session-accept” sid=“7558319155648544293”><content
name=‘Audio-Content’><description
xmlns=“http://jabber.org/protocol/jingle/description/audio
><payload-type id=“3” name="gsm"
channels=“1” clockrate=“0”
/></description><transport
xmlns=“http://jabber.org/protocol/jingle/transport/ice
><candidate generation=“1” ip="202.115.143.185"
port=“10038” network=“0” username="1"
password=“1317316830380645295” preference="0"
type=“relay”/></transport></content></jingle></iq>



From
the two clients debug information we can see that both the clients
Created RTP session to Openfire server, not to
each other. Why?

One more thing , I
even set the server side Windows XP OS registry’s **TCP/IP
Forwarding to 1, **its
still no use.

“IPEnableRouter”=dword:00000001

“IPEnableRouter”=dword:00000001

“IPEnableRouter”=dword:00000001

Thanks very much in
advance for any responce message.
Best regards,

The STUN problem of Openfire<!–

@page

P { margin-bottom: 0.21cm }

A:link

–>

Sorry,

But I’m pretty sure that there is something blocking your UDP traffic between these 2 different LANs.

Best Regards,

Thiago

Hello,

I’m not telling that the Machines are firewalled in their OS, but saying that the Routers or any other network elements between these 2 different LANs has a firewall or something blocking UDP traffic.

Cheers,

Thiago

Thank you for you replay!

But when I ues other IM ,they all work well . And more , I uesd Win-Stun to test the STUN Server on Opnefire , the message as fallows:

Port restricted NAT detected - VoIP will work with STUN

Does not preserve port number

Does not support hairpin of media

Public IP address : 202.115.141.148

I want to know is there any other config deeded on Openfire except STUN Server and Media Proxy Service ? I hope you can help me solve the problem ! Thank you very much !!

Best regards!

Hello,

Port restricted NAT detected - VoIP will work with STUN

Does not preserve port number

Does not support hairpin of media

These details means that you MUST check whihc ports are being restricted, to setup your Openfire Media Proxy Settings to use these port number.

But I don’t recommend port restricted firewalls to run voip, especially in a P2P way.

As we can see in your Jingle debug, it used Relay candidate, which means, no P2P was possible. I strong recommend that you check both routers firewalls.

Jingle Tests detected that you can’t do P2P communication, and your STUN Tester detected port restriction. So you will have to use a media PRoxy (Openfire one).

Openfire server MUST be direct connected to internet and have 2 valid IP address to make STUN Server work, and at least one valid IP address to make media proxy works.

To allow Media Proxy, your Openfire MUST be direct connected to internet, and Openfire MUST NOT have any kind of firewall blocking UDP traffic.

Regards,

Thiago

Thank you very much !

My openfire have direct connected to internet and have 2 valid IP address to make STUN Server work . I can’t understand well about the config of Media Proxy .Will you tell me how to set it ? I only see MAX Port Num and Min Prot Num on Openfire . Which more , I set the Media proxy useable .

I will check my Media Proxy config . Thanks again!!!

I hope I can get more your help in recent days !

Best regards!

Well, Does lulubaiyu from Chengdu China? I’m living this City right, if you like, pls add my MSN:rosener_722@hotmail.com.

And Amitav, if i have any result after talking with lulubaiyu, i will let you know!

Finally, thanks barata7, you are so friendly:) i like this forum!

-rosen jiang

Hi,

I have a question about the router config.

Is there need some special config in the router? For example , if I need config sth about STUN?

Thank you !

Best regards!

Hi Lulubaiyu,

Did u fix this issue (making demo application work in different lan through internet) . I am not getting where i m doing the mistake… My openfire server is directly in public ip. And one more ip i ve added to that to make stun server work. And I have enabled the media proxy also. But still I didnt get any luck. And as per rosenjiang, there is something in between which is blocking the udp packets. And I found that there is fullcone nat in that system. So can u please to help me to overcome with this problem.

Thanking a lot in advance.

Hi, amitav.mohanty

I am sorry , I also did not solve the problem now .

But I can discuss this problem with you together in order to solve the problem earlier !

Best regards!

lulubaiyu

if you want you can add me too, in addition my VLAN Problem appears to be the same one MSN: webmaster@b3nton.de

have you solved the problem so far?

i forgot:

i’ve got a similar problem:

thx