# Question about initLicode \> ErizoController IP and question about stream subscribers

**URL:** <https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253>\
**Category:** Uncategorized\
**Created:** [October 30, 2013, 7:10pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253 "2013-10-30T19:10:53Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [October 30, 2013, 7:10pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/1 "2013-10-30T19:10:53Z")

</div>

Hello every body,

I have started working with Licode for 2 weeks now and i’m very happy with  
it.  
Thanks to your previous help I could start very well.

Now I have 2 questions.

_The most important question :_

If 10 users are in a room, and only 3 are viewed by other users, do the 10  
users send their stream to the server or only the 3 who have at least 1  
subscriber ? Do I have to stop/restart publishing by myself depending to  
the subsribers count for each stream, or is it handle natively by the  
server to save the bandwidth usage ?

_And second question :_

When I start licode with initLicode, I get this line in the log :  
New erizocontroller (1 ) in : 192.168.1.15.

192.168.1.15 is the local address of the server, but how can I do to make  
it use the public address IP (viewed by Internet) to allow users from  
internet to connect, and not only users from the local network ?

Thank you very much for your help 🙂

With these information, I think I can have something ready in 1 or 2 weeks,  
if some of you are interested, I will show you.

Guillaume

---

<div class="post-metadata">

**Author:** ![Wilbert\_Jackson](https://avatars.discourse-cdn.com/v4/letter/w/49beb7/32.png) [@Wilbert\_Jackson](https://discourse.lynckia.com/u/Wilbert_Jackson)\
**Post date:** [November 23, 2013, 4:01pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/2 "2013-11-23T16:01:40Z")

</div>

Guillanume,

In the licode/scripts directory there is the installNuve.sh listed, which  
is shown below. The way I see is working is it copies the licode\_default.js  
script, which is located in licode/scripts, to licode\_i.js then uses  
licode\_1.js to replace licode\_config.js. Before I came across this I would  
set licode\_cofig.js to configure the stun ip and port variables before  
starting the server and then noticed that after nuve was started the  
licode\_config.js stun variables I set earlier where blank. So I set the  
stun variables in licode\_default.js instead of licode\_config.js. In our  
system the stun server still does not work for remote client access as the  
stun server never gets called. Instead clients outside our of local network  
are doing http get to access the server using the server’s local ip address  
and port and thus fail to connect because the server disconnects socket  
initially established when the client room access was granted. Bottom line:

1. From the server I see a remote client connect

2. From the see the device info.

3. From the server see the room access info

4. Then from the server do not see any stun info and the server disconnects  
the client connection

5. From the client see that it was trying to access the servers local ip  
address and port and fails, and stun server was never involved.

6. Check licode\_config.js and I confirm the server ip and port are set.

I could be doing something wrong but have no idea what.

Wilbert

installNuve.sh

#!/bin/bash

SCRIPT=`pwd`/$0  
FILENAME=`basename $SCRIPT`  
PATHNAME=`dirname $SCRIPT`  
ROOT=$PATHNAME/…  
BUILD\_DIR=$ROOT/build  
CURRENT\_DIR=`pwd`  
DB\_DIR=“$BUILD\_DIR”/db

install\_nuve(){  
cd $ROOT/nuve  
./installNuve.sh  
cd $CURRENT\_DIR  
}

populate\_mongo(){

echo [licode] Starting mongodb  
if [! -d “$DB\_DIR”]; then  
mkdir -p “$DB\_DIR”/db  
fi  
mongod --repair --dbpath $DB\_DIR  
mongod --dbpath $DB\_DIR --logpath $BUILD\_DIR/mongo.log --fork  
sleep 5

dbURL=`grep "config.nuve.dataBaseURL" $PATHNAME/licode_default.js`

dbURL=`echo $dbURL| cut -d'"' -f 2`  
dbURL=`echo $dbURL| cut -d'"' -f 1`

echo [licode] Creating superservice in $dbURL  
mongo $dbURL --eval “db.services.insert({name: ‘superService’, key:  
‘$RANDOM’, rooms: })”  
SERVID=`mongo $dbURL --quiet --eval "db.services.findOne()._id"`  
SERVKEY=`mongo $dbURL --quiet --eval "db.services.findOne().key"`

SERVID=`echo $SERVID| cut -d'"' -f 2`  
SERVID=`echo $SERVID| cut -d'"' -f 1`

echo "Mongo Logs: "  
cat $BUILD\_DIR/mongo.log

echo [licode] SuperService ID $SERVID  
echo [licode] SuperService KEY $SERVKEY  
cd $BUILD\_DIR  
replacement=s/_auto\_generated\_ID_/${SERVID}/  
sed $replacement $PATHNAME/licode\_default.js \> $BUILD\_DIR/licode\_1.js  
replacement=s/_auto\_generated\_KEY_/${SERVKEY}/  
sed $replacement $BUILD\_DIR/licode\_1.js \> $ROOT/licode\_config.js  
rm $BUILD\_DIR/licode\_1.js  
}

install\_nuve  
populate\_mongoOn Sat, Nov 23, 2013 at 10:31 AM, Guillaume Lepinay [guyost@gmail.com](mailto:guyost@gmail.com)wrote:

> Hello again, sorry sorry, I just notice that the licode\_default.js is in  
> the scripts directory (sorry again).  
> So I added the IP and port of the stun server inside this file, but it’s  
> still not working.
> 
> I joined my ./licode\_config.js and ./scripts/licode\_default.js
> 
> Thank you.  
> Guillaume
> 
> Le samedi 23 novembre 2013 16:01:07 UTC+1, Guillaume Lepinay a écrit :
> 
> > Hello,
> > 
> > Thank you for helping me, but i’m not sure I understand everything,  
> > because i’m not very good in english and about the configuration maybe…  
> > I tried to do this :
> > 
> > 1. I had no file called licode\_default.js, so I copied licode\_config.js  
> > to licode\_default.js (so now I have the 2 files at the same level).
> > 2. The 2 files are the same, and I joined them in my message, I hope you  
> > can take 1 minute to have a look.
> > 3. I set the IP and port of the stun server in both file.
> > 
> > When I start the server (./script/initLicode) I can see in the log Erizo  
> > is using the local address.  
> > I’m sorry if I didn’t do it correctly… please can you help me little  
> > bit more ?
> > 
> > Thank you.  
> > Guillaume
> > 
> > Le samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :
> > 
> > > We have only been able to set the licode\_config.js stun server ip and  
> > > port info by setting it in the the licode\_default.js when newly starting  
> > > the server. the nuve script takes the licode\_default settings and uses them  
> > > to replace the licode\_config.js settings. Are you sure  
> > > your licode\_config.js file has the server and ip info set? Even when we  
> > > set the licode\_config.js per Javier’s instructions the stun server is  
> > > not working for access outside of our local lan. Tried this many, many,  
> > > many times!
> > > 
> > > On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > 
> > > > Hello, I tried this settings, with the IP address :
> > > > 
> > > > _//STUN server IP address and port to be used by the server._  
> > > > _//if ‘’ is used, the address is discovered locally_  
> > > > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > > > _config.erizo.stunport = 19302;_
> > > > 
> > > > But still the same… Erizo controller starts using the local IP  
> > > > address, as I can see when I run ./script/initLicode.sh :  
> > > > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > > > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > > > 
> > > > Is there really now way to use it behind a nat… ?  
> > > > I’m starting the project, I can’t afford a server just for testing…  
> > > > and my current has 200Mbps bandwith… that’s why I would like to use it…  
> > > > I don’t know exactly how is the IP used after Erizo is started, because  
> > > > i’m not good enough for the network part… but is it possible just to  
> > > > specify the IP address we want in the config file ? or use another service  
> > > > like a simple webpage that returns the IP address of the host (we could  
> > > > specify this url in the licode\_config.js file ?
> > > > 
> > > > Thank you for your help… for now that’s the most blocking point for  
> > > > my project 🙂
> > > > 
> > > > Guillaume
> > > > 
> > > > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :
> > > > 
> > > > > Hi Guillaume,
> > > > > 
> > > > > Currently Erizo only supports setting the IP address (no DNS) in the config.erizo.stunserver  
> > > > > variable. Please, try with .
> > > > > 
> > > > > Cheers,  
> > > > > Javier.
> > > > > 
> > > > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > I just tried the STUN server configuration for Erizo.  
> > > > > > I’m using a virtual machine (VirtualBox). The host is Windows Server,  
> > > > > > directly connected to the internet (No NAT), and the guest is the Ubuntu  
> > > > > > that host the Licode server.
> > > > > > 
> > > > > > The virtual network for the guest is under a NAT (the virtualbox  
> > > > > > nat), because nothing else was working to connect the guest to the internet  
> > > > > > and use the host IP.
> > > > > > 
> > > > > > So I configured the settings like this in licode\_config.js :
> > > > > > 
> > > > > > //STUN server IP address and port to be used by the server.  
> > > > > > //if ‘’ is used, the address is discovered locally  
> > > > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > > > config.erizo.stunport = 19302;
> > > > > > 
> > > > > > But Erizo is still using the local address behind the nat, instead of  
> > > > > > the external address.  
> > > > > > Is there something else I should do ?
> > > > > > 
> > > > > > Thank you for your help.  
> > > > > > Guillaume
> > > > > > 
> > > > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > > > 
> > > > > > > Hi,
> > > > > > > 
> > > > > > > For the first question, Licode solves it for you. You only have to  
> > > > > > > send every stream once to Licode and Licode will forward it to several  
> > > > > > > users. So the answer is that it is handle natively by the server.
> > > > > > > 
> > > > > > > For the second question, the best solution would be not to use a NAT  
> > > > > > > device between ErizoController and the Internet, which I guess is your  
> > > > > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > > > > corresponding lines:
> > > > > > > 
> > > > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > > > config.erizo.stunport = stun\_server\_port;
> > > > > > > 
> > > > > > > With your preferred stun server address and ports.
> > > > > > > 
> > > > > > > Cheers,  
> > > > > > > Javier.
> > > > > > > 
> > > > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > 
> > > > > > > > Hello every body,
> > > > > > > > 
> > > > > > > > I have started working with Licode for 2 weeks now and i’m very  
> > > > > > > > happy with it.  
> > > > > > > > Thanks to your previous help I could start very well.
> > > > > > > > 
> > > > > > > > Now I have 2 questions.
> > > > > > > > 
> > > > > > > > _The most important question :_
> > > > > > > > 
> > > > > > > > If 10 users are in a room, and only 3 are viewed by other users, do  
> > > > > > > > the 10 users send their stream to the server or only the 3 who have at  
> > > > > > > > least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > > > by the server to save the bandwidth usage ?
> > > > > > > > 
> > > > > > > > _And second question :_
> > > > > > > > 
> > > > > > > > When I start licode with initLicode, I get this line in the log :  
> > > > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > > > 
> > > > > > > > 192.168.1.15 is the local address of the server, but how can I do  
> > > > > > > > to make it use the public address IP (viewed by Internet) to allow users  
> > > > > > > > from internet to connect, and not only users from the local network ?
> > > > > > > > 
> > > > > > > > Thank you very much for your help 🙂
> > > > > > > > 
> > > > > > > > With these information, I think I can have something ready in 1 or  
> > > > > > > > 2 weeks, if some of you are interested, I will show you.
> > > > > > > > 
> > > > > > > > Guillaume
> > > > > > > > 
> > > > > > > > –  
> > > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > > Groups “lynckia” group.  
> > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > > > 
> > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > 
> > > > > > > –  
> > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > Groups “lynckia” group.  
> > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > 
> > > > > –  
> > > > > You received this message because you are subscribed to a topic in the  
> > > > > Google Groups “lynckia” group.  
> > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > –  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups “lynckia” group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Bill\_Yu](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@Bill\_Yu](https://discourse.lynckia.com/u/Bill_Yu)\
**Post date:** [November 2, 2013, 2:53pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/3 "2013-11-02T14:53:58Z")

</div>

Hi,

I also have this problem, so hope there are methods to set this.

Guillaume Lepinay於 2013年10月31日星期四UTC+8上午3時10分53秒寫道：\>

> Hello every body,
> 
> I have started working with Licode for 2 weeks now and i’m very happy with  
> it.  
> Thanks to your previous help I could start very well.
> 
> Now I have 2 questions.
> 
> _The most important question :_
> 
> If 10 users are in a room, and only 3 are viewed by other users, do the 10  
> users send their stream to the server or only the 3 who have at least 1  
> subscriber ? Do I have to stop/restart publishing by myself depending to  
> the subsribers count for each stream, or is it handle natively by the  
> server to save the bandwidth usage ?
> 
> _And second question :_
> 
> When I start licode with initLicode, I get this line in the log :  
> New erizocontroller (1 ) in : 192.168.1.15.
> 
> 192.168.1.15 is the local address of the server, but how can I do to make  
> it use the public address IP (viewed by Internet) to allow users from  
> internet to connect, and not only users from the local network ?
> 
> Thank you very much for your help 🙂
> 
> With these information, I think I can have something ready in 1 or 2  
> weeks, if some of you are interested, I will show you.
> 
> Guillaume

---

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [November 5, 2013, 11:50am UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/4 "2013-11-05T11:50:37Z")

</div>

Thank you very much for your help.  
Everything is ok about it now.

I will check how to configure the STUN server to use the external IP when  
the server is behind a NAT 🙂

Thank you :).2013/11/5 Javier Cerviño [jcague@gmail.com](mailto:jcague@gmail.com)

> It depends on what you want to offer on your applications. A user can  
> publish the video and other users can subscribe to it. Or a user can be  
> connected to the room and he don’t have to publish or subscribe anything.  
> Or another user can start publish the video in the middle of the conference  
> and stop publishing it after a while. You can take a look at the docs in  
> [Redirecting…](http://lynckia.com/licode/client-api.html)
> 
> Cheers,  
> Javier.
> 
> On 4 November 2013 22:48, Guillaume Lepinay [guyost@gmail.com](mailto:guyost@gmail.com) wrote:
> 
> > Thank you for the reply.
> > 
> > I understood for the 2nd question.  
> > For the first question, I would like just a little bit more information.  
> > If I understood well, every time a client enter the room, he is uploading  
> > his stream to the server, and the server will send his viewer. But if there  
> > is no viewer for a client, does it send his stream to the server anyway, or  
> > is there a native system that can say to the “unview” client : “Don’t  
> > publish for the moment, no one subscribe to your stream” and when there is  
> > a viewer, it can publish again. (to save the download bandwith of the  
> > server if there are many people in a room, but only few of them are viewed).
> > 
> > I hope you could understand me correctly…
> > 
> > Thank you very much.  
> > Guillaume
> > 
> > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > 
> > > Hi,
> > > 
> > > For the first question, Licode solves it for you. You only have to send  
> > > every stream once to Licode and Licode will forward it to several users. So  
> > > the answer is that it is handle natively by the server.
> > > 
> > > For the second question, the best solution would be not to use a NAT  
> > > device between ErizoController and the Internet, which I guess is your  
> > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > You can check the licode\_config.js and put a configuration like this in the  
> > > corresponding lines:
> > > 
> > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > config.erizo.stunport = stun\_server\_port;
> > > 
> > > With your preferred stun server address and ports.
> > > 
> > > Cheers,  
> > > Javier.
> > > 
> > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > 
> > > > Hello every body,
> > > > 
> > > > I have started working with Licode for 2 weeks now and i’m very happy  
> > > > with it.  
> > > > Thanks to your previous help I could start very well.
> > > > 
> > > > Now I have 2 questions.
> > > > 
> > > > _The most important question :_
> > > > 
> > > > If 10 users are in a room, and only 3 are viewed by other users, do the  
> > > > 10 users send their stream to the server or only the 3 who have at least 1  
> > > > subscriber ? Do I have to stop/restart publishing by myself depending to  
> > > > the subsribers count for each stream, or is it handle natively by the  
> > > > server to save the bandwidth usage ?
> > > > 
> > > > _And second question :_
> > > > 
> > > > When I start licode with initLicode, I get this line in the log :  
> > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > 
> > > > 192.168.1.15 is the local address of the server, but how can I do to  
> > > > make it use the public address IP (viewed by Internet) to allow users from  
> > > > internet to connect, and not only users from the local network ?
> > > > 
> > > > Thank you very much for your help 🙂
> > > > 
> > > > With these information, I think I can have something ready in 1 or 2  
> > > > weeks, if some of you are interested, I will show you.
> > > > 
> > > > Guillaume
> > > > 
> > > > –  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups “lynckia” group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > –  
> > > You received this message because you are subscribed to the Google Groups  
> > > “lynckia” group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> –  
> You received this message because you are subscribed to a topic in the  
> Google Groups “lynckia” group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [November 22, 2013, 3:08pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/5 "2013-11-22T15:08:47Z")

</div>

Hello,

I just tried the STUN server configuration for Erizo.  
I’m using a virtual machine (VirtualBox). The host is Windows Server,  
directly connected to the internet (No NAT), and the guest is the Ubuntu  
that host the Licode server.

The virtual network for the guest is under a NAT (the virtualbox nat),  
because nothing else was working to connect the guest to the internet and  
use the host IP.

So I configured the settings like this in licode\_config.js :

//STUN server IP address and port to be used by the server.  
//if ‘’ is used, the address is discovered locally  
config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
config.erizo.stunport = 19302;

But Erizo is still using the local address behind the nat, instead of the  
external address.  
Is there something else I should do ?

Thank you for your help.  
GuillaumeLe lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :

> Hi,
> 
> For the first question, Licode solves it for you. You only have to send  
> every stream once to Licode and Licode will forward it to several users. So  
> the answer is that it is handle natively by the server.
> 
> For the second question, the best solution would be not to use a NAT  
> device between ErizoController and the Internet, which I guess is your  
> scenario. But you can also configure Erizo Controller to use a STUN server.  
> You can check the licode\_config.js and put a configuration like this in the  
> corresponding lines:
> 
> config.erizo.stunserver = ‘stun\_server\_IP’;  
> config.erizo.stunport = stun\_server\_port;
> 
> With your preferred stun server address and ports.
> 
> Cheers,  
> Javier.
> 
> On 30 October 2013 20:10, Guillaume Lepinay \<[guy...@gmail.com](mailto:guy...@gmail.com)\<javascript:\> wrote:
> 
> > Hello every body,
> > 
> > I have started working with Licode for 2 weeks now and i’m very happy  
> > with it.  
> > Thanks to your previous help I could start very well.
> > 
> > Now I have 2 questions.
> > 
> > _The most important question :_
> > 
> > If 10 users are in a room, and only 3 are viewed by other users, do the  
> > 10 users send their stream to the server or only the 3 who have at least 1  
> > subscriber ? Do I have to stop/restart publishing by myself depending to  
> > the subsribers count for each stream, or is it handle natively by the  
> > server to save the bandwidth usage ?
> > 
> > _And second question :_
> > 
> > When I start licode with initLicode, I get this line in the log :  
> > New erizocontroller (1 ) in : 192.168.1.15.
> > 
> > 192.168.1.15 is the local address of the server, but how can I do to make  
> > it use the public address IP (viewed by Internet) to allow users from  
> > internet to connect, and not only users from the local network ?
> > 
> > Thank you very much for your help 🙂
> > 
> > With these information, I think I can have something ready in 1 or 2  
> > weeks, if some of you are interested, I will show you.
> > 
> > Guillaume
> > 
> > –  
> > You received this message because you are subscribed to the Google Groups  
> > “lynckia” group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jukka](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jukka](https://discourse.lynckia.com/u/Jukka)\
**Post date:** [November 25, 2013, 7:27am UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/6 "2013-11-25T07:27:05Z")

</div>

Hi,

I managed to get it running behind NAT but it works only on Chrome. Firefox  
gets the WebSocket connection and is able to exchange the SDPs with Erizo  
but the stream from Firefox client never reaches Erizo. However, with  
Chrome the stream is published succesfully. I haven’t figured out yet what  
is wrong with Firefox. I have all the necessary ports forwarded properly. I  
think it has something to do with the SDP Firefox creates.

To get it working I set the public IP manually and remembered to set user  
role to “presenter” (without that user does not have permission to publish  
streams).

- Jukka

lauantai, 23. marraskuuta 2013 18.53.15 UTC+2 Guillaume Lepinay kirjoitti:\>

> Hello Wilbert,
> 
> So finally even with all you said, it’s finally not working behind a NAT ?  
> I’d like my project to be online at the beginning of december for a test  
> version, so I think the best is I use a server directly connected, with no  
> NAT for now ?
> 
> I will check if I can get one quickly to reinstall everything on it.  
> Thank you very much for you help.
> 
> Le samedi 23 novembre 2013 17:01:40 UTC+1, Wilbert Jackson a écrit :
> 
> > Guillanume,
> > 
> > In the licode/scripts directory there is the installNuve.sh listed, which  
> > is shown below. The way I see is working is it copies the licode\_default.js  
> > script, which is located in licode/scripts, to licode\_i.js then uses  
> > licode\_1.js to replace licode\_config.js. Before I came across this I would  
> > set licode\_cofig.js to configure the stun ip and port variables before  
> > starting the server and then noticed that after nuve was started the  
> > licode\_config.js stun variables I set earlier where blank. So I set the  
> > stun variables in licode\_default.js instead of licode\_config.js. In our  
> > system the stun server still does not work for remote client access as the  
> > stun server never gets called. Instead clients outside our of local network  
> > are doing http get to access the server using the server’s local ip address  
> > and port and thus fail to connect because the server disconnects socket  
> > initially established when the client room access was granted. Bottom line:
> > 
> > 1. From the server I see a remote client connect
> > 
> > 2. From the see the device info.
> > 
> > 3. From the server see the room access info
> > 
> > 4. Then from the server do not see any stun info and the server  
> > disconnects the client connection
> > 
> > 5. From the client see that it was trying to access the servers local ip  
> > address and port and fails, and stun server was never involved.
> > 
> > 6. Check licode\_config.js and I confirm the server ip and port are set.
> > 
> > I could be doing something wrong but have no idea what.
> > 
> > Wilbert
> > 
> > installNuve.sh
> > 
> > #!/bin/bash
> > 
> > SCRIPT=`pwd`/$0  
> > FILENAME=`basename $SCRIPT`  
> > PATHNAME=`dirname $SCRIPT`  
> > ROOT=$PATHNAME/…  
> > BUILD\_DIR=$ROOT/build  
> > CURRENT\_DIR=`pwd`  
> > DB\_DIR=“$BUILD\_DIR”/db
> > 
> > install\_nuve(){  
> > cd $ROOT/nuve  
> > ./installNuve.sh  
> > cd $CURRENT\_DIR  
> > }
> > 
> > populate\_mongo(){
> > 
> > echo [licode] Starting mongodb  
> > if [! -d “$DB\_DIR”]; then  
> > mkdir -p “$DB\_DIR”/db  
> > fi  
> > mongod --repair --dbpath $DB\_DIR  
> > mongod --dbpath $DB\_DIR --logpath $BUILD\_DIR/mongo.log --fork  
> > sleep 5
> > 
> > dbURL=`grep "config.nuve.dataBaseURL" $PATHNAME/licode_default.js`
> > 
> > dbURL=`echo $dbURL| cut -d'"' -f 2`  
> > dbURL=`echo $dbURL| cut -d'"' -f 1`
> > 
> > echo [licode] Creating superservice in $dbURL  
> > mongo $dbURL --eval “db.services.insert({name: ‘superService’, key:  
> > ‘$RANDOM’, rooms: })”  
> > SERVID=`mongo $dbURL --quiet --eval "db.services.findOne()._id"`  
> > SERVKEY=`mongo $dbURL --quiet --eval "db.services.findOne().key"`
> > 
> > SERVID=`echo $SERVID| cut -d'"' -f 2`  
> > SERVID=`echo $SERVID| cut -d'"' -f 1`
> > 
> > echo "Mongo Logs: "  
> > cat $BUILD\_DIR/mongo.log
> > 
> > echo [licode] SuperService ID $SERVID  
> > echo [licode] SuperService KEY $SERVKEY  
> > cd $BUILD\_DIR  
> > replacement=s/_auto\_generated\_ID_/${SERVID}/  
> > sed $replacement $PATHNAME/licode\_default.js \> $BUILD\_DIR/licode\_1.js  
> > replacement=s/_auto\_generated\_KEY_/${SERVKEY}/  
> > sed $replacement $BUILD\_DIR/licode\_1.js \> $ROOT/licode\_config.js  
> > rm $BUILD\_DIR/licode\_1.js  
> > }
> > 
> > install\_nuve  
> > populate\_mongo
> > 
> > On Sat, Nov 23, 2013 at 10:31 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > 
> > > Hello again, sorry sorry, I just notice that the licode\_default.js is in  
> > > the scripts directory (sorry again).  
> > > So I added the IP and port of the stun server inside this file, but it’s  
> > > still not working.
> > > 
> > > I joined my ./licode\_config.js and ./scripts/licode\_default.js
> > > 
> > > Thank you.  
> > > Guillaume
> > > 
> > > Le samedi 23 novembre 2013 16:01:07 UTC+1, Guillaume Lepinay a écrit :
> > > 
> > > > Hello,
> > > > 
> > > > Thank you for helping me, but i’m not sure I understand everything,  
> > > > because i’m not very good in english and about the configuration maybe…  
> > > > I tried to do this :
> > > > 
> > > > 1. I had no file called licode\_default.js, so I copied licode\_config.js  
> > > > to licode\_default.js (so now I have the 2 files at the same level).
> > > > 2. The 2 files are the same, and I joined them in my message, I hope  
> > > > you can take 1 minute to have a look.
> > > > 3. I set the IP and port of the stun server in both file.
> > > > 
> > > > When I start the server (./script/initLicode) I can see in the log  
> > > > Erizo is using the local address.  
> > > > I’m sorry if I didn’t do it correctly… please can you help me little  
> > > > bit more ?
> > > > 
> > > > Thank you.  
> > > > Guillaume
> > > > 
> > > > Le samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :
> > > > 
> > > > > We have only been able to set the licode\_config.js stun server ip and  
> > > > > port info by setting it in the the licode\_default.js when newly starting  
> > > > > the server. the nuve script takes the licode\_default settings and uses them  
> > > > > to replace the licode\_config.js settings. Are you sure  
> > > > > your licode\_config.js file has the server and ip info set? Even when we  
> > > > > set the licode\_config.js per Javier’s instructions the stun server is  
> > > > > not working for access outside of our local lan. Tried this many, many,  
> > > > > many times!
> > > > > 
> > > > > On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > 
> > > > > > Hello, I tried this settings, with the IP address :
> > > > > > 
> > > > > > _//STUN server IP address and port to be used by the server._  
> > > > > > _//if ‘’ is used, the address is discovered locally_  
> > > > > > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > > > > > _config.erizo.stunport = 19302;_
> > > > > > 
> > > > > > But still the same… Erizo controller starts using the local IP  
> > > > > > address, as I can see when I run ./script/initLicode.sh :  
> > > > > > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > > > > > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > > > > > 
> > > > > > Is there really now way to use it behind a nat… ?  
> > > > > > I’m starting the project, I can’t afford a server just for testing…  
> > > > > > and my current has 200Mbps bandwith… that’s why I would like to use it…  
> > > > > > I don’t know exactly how is the IP used after Erizo is started,  
> > > > > > because i’m not good enough for the network part… but is it possible just  
> > > > > > to specify the IP address we want in the config file ? or use another  
> > > > > > service like a simple webpage that returns the IP address of the host (we  
> > > > > > could specify this url in the licode\_config.js file ?
> > > > > > 
> > > > > > Thank you for your help… for now that’s the most blocking point for  
> > > > > > my project 🙂
> > > > > > 
> > > > > > Guillaume
> > > > > > 
> > > > > > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :
> > > > > > 
> > > > > > > Hi Guillaume,
> > > > > > > 
> > > > > > > Currently Erizo only supports setting the IP address (no DNS) in  
> > > > > > > the config.erizo.stunserver variable. Please, try with .
> > > > > > > 
> > > > > > > Cheers,  
> > > > > > > Javier.
> > > > > > > 
> > > > > > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > 
> > > > > > > > Hello,
> > > > > > > > 
> > > > > > > > I just tried the STUN server configuration for Erizo.  
> > > > > > > > I’m using a virtual machine (VirtualBox). The host is Windows  
> > > > > > > > Server, directly connected to the internet (No NAT), and the guest is the  
> > > > > > > > Ubuntu that host the Licode server.
> > > > > > > > 
> > > > > > > > The virtual network for the guest is under a NAT (the virtualbox  
> > > > > > > > nat), because nothing else was working to connect the guest to the internet  
> > > > > > > > and use the host IP.
> > > > > > > > 
> > > > > > > > So I configured the settings like this in licode\_config.js :
> > > > > > > > 
> > > > > > > > //STUN server IP address and port to be used by the server.  
> > > > > > > > //if ‘’ is used, the address is discovered locally  
> > > > > > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > > > > > config.erizo.stunport = 19302;
> > > > > > > > 
> > > > > > > > But Erizo is still using the local address behind the nat, instead  
> > > > > > > > of the external address.  
> > > > > > > > Is there something else I should do ?
> > > > > > > > 
> > > > > > > > Thank you for your help.  
> > > > > > > > Guillaume
> > > > > > > > 
> > > > > > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > > > > > 
> > > > > > > > > Hi,
> > > > > > > > > 
> > > > > > > > > For the first question, Licode solves it for you. You only have to  
> > > > > > > > > send every stream once to Licode and Licode will forward it to several  
> > > > > > > > > users. So the answer is that it is handle natively by the server.
> > > > > > > > > 
> > > > > > > > > For the second question, the best solution would be not to use a  
> > > > > > > > > NAT device between ErizoController and the Internet, which I guess is your  
> > > > > > > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > > > > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > > > > > > corresponding lines:
> > > > > > > > > 
> > > > > > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > > > > > config.erizo.stunport = stun\_server\_port;
> > > > > > > > > 
> > > > > > > > > With your preferred stun server address and ports.
> > > > > > > > > 
> > > > > > > > > Cheers,  
> > > > > > > > > Javier.
> > > > > > > > > 
> > > > > > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > > 
> > > > > > > > > > Hello every body,
> > > > > > > > > > 
> > > > > > > > > > I have started working with Licode for 2 weeks now and i’m very  
> > > > > > > > > > happy with it.  
> > > > > > > > > > Thanks to your previous help I could start very well.
> > > > > > > > > > 
> > > > > > > > > > Now I have 2 questions.
> > > > > > > > > > 
> > > > > > > > > > _The most important question :_
> > > > > > > > > > 
> > > > > > > > > > If 10 users are in a room, and only 3 are viewed by other users,  
> > > > > > > > > > do the 10 users send their stream to the server or only the 3 who have at  
> > > > > > > > > > least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > > > > > by the server to save the bandwidth usage ?
> > > > > > > > > > 
> > > > > > > > > > _And second question :_
> > > > > > > > > > 
> > > > > > > > > > When I start licode with initLicode, I get this line in the log :  
> > > > > > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > > > > > 
> > > > > > > > > > 192.168.1.15 is the local address of the server, but how can I do  
> > > > > > > > > > to make it use the public address IP (viewed by Internet) to allow users  
> > > > > > > > > > from internet to connect, and not only users from the local network ?
> > > > > > > > > > 
> > > > > > > > > > Thank you very much for your help 🙂
> > > > > > > > > > 
> > > > > > > > > > With these information, I think I can have something ready in 1  
> > > > > > > > > > or 2 weeks, if some of you are interested, I will show you.
> > > > > > > > > > 
> > > > > > > > > > Guillaume
> > > > > > > > > > 
> > > > > > > > > > –  
> > > > > > > > > > You received this message because you are subscribed to the  
> > > > > > > > > > Google Groups “lynckia” group.  
> > > > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > > > > > 
> > > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > > > 
> > > > > > > > > –  
> > > > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > > > Groups “lynckia” group.  
> > > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > 
> > > > > > > –  
> > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > the Google Groups “lynckia” group.  
> > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > 
> > > > > –  
> > > > > You received this message because you are subscribed to a topic in the  
> > > > > Google Groups “lynckia” group.  
> > > > > To unsubscribe from this topic, visit  
> > > > > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [November 23, 2013, 1:34pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/7 "2013-11-23T13:34:42Z")

</div>

Hello, I tried this settings, with the IP address :

_//STUN server IP address and port to be used by the server._  
_//if ‘’ is used, the address is discovered locally_  
_config.erizo.stunserver = ‘173.194.78.127’;_  
_config.erizo.stunport = 19302;_

But still the same… Erizo controller starts using the local IP address,  
as I can see when I run ./script/initLicode.sh :  
_New erizocontroller ( 1 ) in: 10.0.2.15_  
_2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_

Is there really now way to use it behind a nat… ?  
I’m starting the project, I can’t afford a server just for testing… and  
my current has 200Mbps bandwith… that’s why I would like to use it…  
I don’t know exactly how is the IP used after Erizo is started, because i’m  
not good enough for the network part… but is it possible just to specify  
the IP address we want in the config file ? or use another service like a  
simple webpage that returns the IP address of the host (we could specify  
this url in the licode\_config.js file ?

Thank you for your help… for now that’s the most blocking point for my  
project 🙂

GuillaumeLe vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :

> Hi Guillaume,
> 
> Currently Erizo only supports setting the IP address (no DNS) in the config.erizo.stunserver  
> variable. Please, try with .
> 
> Cheers,  
> Javier.
> 
> On 22 November 2013 16:08, Guillaume Lepinay \<[guy...@gmail.com](mailto:guy...@gmail.com)\<javascript:\> wrote:
> 
> > Hello,
> > 
> > I just tried the STUN server configuration for Erizo.  
> > I’m using a virtual machine (VirtualBox). The host is Windows Server,  
> > directly connected to the internet (No NAT), and the guest is the Ubuntu  
> > that host the Licode server.
> > 
> > The virtual network for the guest is under a NAT (the virtualbox nat),  
> > because nothing else was working to connect the guest to the internet and  
> > use the host IP.
> > 
> > So I configured the settings like this in licode\_config.js :
> > 
> > //STUN server IP address and port to be used by the server.  
> > //if ‘’ is used, the address is discovered locally  
> > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > config.erizo.stunport = 19302;
> > 
> > But Erizo is still using the local address behind the nat, instead of the  
> > external address.  
> > Is there something else I should do ?
> > 
> > Thank you for your help.  
> > Guillaume
> > 
> > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > 
> > > Hi,
> > > 
> > > For the first question, Licode solves it for you. You only have to send  
> > > every stream once to Licode and Licode will forward it to several users. So  
> > > the answer is that it is handle natively by the server.
> > > 
> > > For the second question, the best solution would be not to use a NAT  
> > > device between ErizoController and the Internet, which I guess is your  
> > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > You can check the licode\_config.js and put a configuration like this in the  
> > > corresponding lines:
> > > 
> > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > config.erizo.stunport = stun\_server\_port;
> > > 
> > > With your preferred stun server address and ports.
> > > 
> > > Cheers,  
> > > Javier.
> > > 
> > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > 
> > > > Hello every body,
> > > > 
> > > > I have started working with Licode for 2 weeks now and i’m very happy  
> > > > with it.  
> > > > Thanks to your previous help I could start very well.
> > > > 
> > > > Now I have 2 questions.
> > > > 
> > > > _The most important question :_
> > > > 
> > > > If 10 users are in a room, and only 3 are viewed by other users, do the  
> > > > 10 users send their stream to the server or only the 3 who have at least 1  
> > > > subscriber ? Do I have to stop/restart publishing by myself depending to  
> > > > the subsribers count for each stream, or is it handle natively by the  
> > > > server to save the bandwidth usage ?
> > > > 
> > > > _And second question :_
> > > > 
> > > > When I start licode with initLicode, I get this line in the log :  
> > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > 
> > > > 192.168.1.15 is the local address of the server, but how can I do to  
> > > > make it use the public address IP (viewed by Internet) to allow users from  
> > > > internet to connect, and not only users from the local network ?
> > > > 
> > > > Thank you very much for your help 🙂
> > > > 
> > > > With these information, I think I can have something ready in 1 or 2  
> > > > weeks, if some of you are interested, I will show you.
> > > > 
> > > > Guillaume
> > > > 
> > > > –  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups “lynckia” group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > –  
> > > You received this message because you are subscribed to the Google Groups  
> > > “lynckia” group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com) \<javascript:\>.  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [November 4, 2013, 9:48pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/8 "2013-11-04T21:48:55Z")

</div>

Thank you for the reply.

I understood for the 2nd question.  
For the first question, I would like just a little bit more information. If  
I understood well, every time a client enter the room, he is uploading his  
stream to the server, and the server will send his viewer. But if there is  
no viewer for a client, does it send his stream to the server anyway, or is  
there a native system that can say to the “unview” client : “Don’t publish  
for the moment, no one subscribe to your stream” and when there is a  
viewer, it can publish again. (to save the download bandwith of the server  
if there are many people in a room, but only few of them are viewed).

I hope you could understand me correctly…

Thank you very much.  
GuillaumeLe lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :

> Hi,
> 
> For the first question, Licode solves it for you. You only have to send  
> every stream once to Licode and Licode will forward it to several users. So  
> the answer is that it is handle natively by the server.
> 
> For the second question, the best solution would be not to use a NAT  
> device between ErizoController and the Internet, which I guess is your  
> scenario. But you can also configure Erizo Controller to use a STUN server.  
> You can check the licode\_config.js and put a configuration like this in the  
> corresponding lines:
> 
> config.erizo.stunserver = ‘stun\_server\_IP’;  
> config.erizo.stunport = stun\_server\_port;
> 
> With your preferred stun server address and ports.
> 
> Cheers,  
> Javier.
> 
> On 30 October 2013 20:10, Guillaume Lepinay \<[guy...@gmail.com](mailto:guy...@gmail.com)\<javascript:\> wrote:
> 
> > Hello every body,
> > 
> > I have started working with Licode for 2 weeks now and i’m very happy  
> > with it.  
> > Thanks to your previous help I could start very well.
> > 
> > Now I have 2 questions.
> > 
> > _The most important question :_
> > 
> > If 10 users are in a room, and only 3 are viewed by other users, do the  
> > 10 users send their stream to the server or only the 3 who have at least 1  
> > subscriber ? Do I have to stop/restart publishing by myself depending to  
> > the subsribers count for each stream, or is it handle natively by the  
> > server to save the bandwidth usage ?
> > 
> > _And second question :_
> > 
> > When I start licode with initLicode, I get this line in the log :  
> > New erizocontroller (1 ) in : 192.168.1.15.
> > 
> > 192.168.1.15 is the local address of the server, but how can I do to make  
> > it use the public address IP (viewed by Internet) to allow users from  
> > internet to connect, and not only users from the local network ?
> > 
> > Thank you very much for your help 🙂
> > 
> > With these information, I think I can have something ready in 1 or 2  
> > weeks, if some of you are interested, I will show you.
> > 
> > Guillaume
> > 
> > –  
> > You received this message because you are subscribed to the Google Groups  
> > “lynckia” group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [November 23, 2013, 3:01pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/9 "2013-11-23T15:01:07Z")

</div>

Hello,

Thank you for helping me, but i’m not sure I understand everything, because  
i’m not very good in english and about the configuration maybe…  
I tried to do this :

1. I had no file called licode\_default.js, so I copied licode\_config.js to  
licode\_default.js (so now I have the 2 files at the same level).
2. The 2 files are the same, and I joined them in my message, I hope you  
can take 1 minute to have a look.
3. I set the IP and port of the stun server in both file.

When I start the server (./script/initLicode) I can see in the log Erizo is  
using the local address.  
I’m sorry if I didn’t do it correctly… please can you help me little bit  
more ?

Thank you.  
GuillaumeLe samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :

> We have only been able to set the licode\_config.js stun server ip and port  
> info by setting it in the the licode\_default.js when newly starting the  
> server. the nuve script takes the licode\_default settings and uses them to  
> replace the licode\_config.js settings. Are you sure your licode\_config.js  
> file has the server and ip info set? Even when we set the licode\_config.js  
> per Javier’s instructions the stun server is not working for access  
> outside of our local lan. Tried this many, many, many times!
> 
> On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay \<[guy...@gmail.com](mailto:guy...@gmail.com)\<javascript:\> wrote:
> 
> > Hello, I tried this settings, with the IP address :
> > 
> > _//STUN server IP address and port to be used by the server._  
> > _//if ‘’ is used, the address is discovered locally_  
> > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > _config.erizo.stunport = 19302;_
> > 
> > But still the same… Erizo controller starts using the local IP address,  
> > as I can see when I run ./script/initLicode.sh :  
> > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > 
> > Is there really now way to use it behind a nat… ?  
> > I’m starting the project, I can’t afford a server just for testing… and  
> > my current has 200Mbps bandwith… that’s why I would like to use it…  
> > I don’t know exactly how is the IP used after Erizo is started, because  
> > i’m not good enough for the network part… but is it possible just to  
> > specify the IP address we want in the config file ? or use another service  
> > like a simple webpage that returns the IP address of the host (we could  
> > specify this url in the licode\_config.js file ?
> > 
> > Thank you for your help… for now that’s the most blocking point for my  
> > project 🙂
> > 
> > Guillaume
> > 
> > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :
> > 
> > > Hi Guillaume,
> > > 
> > > Currently Erizo only supports setting the IP address (no DNS) in the config.erizo.stunserver  
> > > variable. Please, try with .
> > > 
> > > Cheers,  
> > > Javier.
> > > 
> > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > 
> > > > Hello,
> > > > 
> > > > I just tried the STUN server configuration for Erizo.  
> > > > I’m using a virtual machine (VirtualBox). The host is Windows Server,  
> > > > directly connected to the internet (No NAT), and the guest is the Ubuntu  
> > > > that host the Licode server.
> > > > 
> > > > The virtual network for the guest is under a NAT (the virtualbox nat),  
> > > > because nothing else was working to connect the guest to the internet and  
> > > > use the host IP.
> > > > 
> > > > So I configured the settings like this in licode\_config.js :
> > > > 
> > > > //STUN server IP address and port to be used by the server.  
> > > > //if ‘’ is used, the address is discovered locally  
> > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > config.erizo.stunport = 19302;
> > > > 
> > > > But Erizo is still using the local address behind the nat, instead of  
> > > > the external address.  
> > > > Is there something else I should do ?
> > > > 
> > > > Thank you for your help.  
> > > > Guillaume
> > > > 
> > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > 
> > > > > Hi,
> > > > > 
> > > > > For the first question, Licode solves it for you. You only have to  
> > > > > send every stream once to Licode and Licode will forward it to several  
> > > > > users. So the answer is that it is handle natively by the server.
> > > > > 
> > > > > For the second question, the best solution would be not to use a NAT  
> > > > > device between ErizoController and the Internet, which I guess is your  
> > > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > > corresponding lines:
> > > > > 
> > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > config.erizo.stunport = stun\_server\_port;
> > > > > 
> > > > > With your preferred stun server address and ports.
> > > > > 
> > > > > Cheers,  
> > > > > Javier.
> > > > > 
> > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > > > 
> > > > > > Hello every body,
> > > > > > 
> > > > > > I have started working with Licode for 2 weeks now and i’m very happy  
> > > > > > with it.  
> > > > > > Thanks to your previous help I could start very well.
> > > > > > 
> > > > > > Now I have 2 questions.
> > > > > > 
> > > > > > _The most important question :_
> > > > > > 
> > > > > > If 10 users are in a room, and only 3 are viewed by other users, do  
> > > > > > the 10 users send their stream to the server or only the 3 who have at  
> > > > > > least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > by the server to save the bandwidth usage ?
> > > > > > 
> > > > > > _And second question :_
> > > > > > 
> > > > > > When I start licode with initLicode, I get this line in the log :  
> > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > 
> > > > > > 192.168.1.15 is the local address of the server, but how can I do to  
> > > > > > make it use the public address IP (viewed by Internet) to allow users from  
> > > > > > internet to connect, and not only users from the local network ?
> > > > > > 
> > > > > > Thank you very much for your help 🙂
> > > > > > 
> > > > > > With these information, I think I can have something ready in 1 or 2  
> > > > > > weeks, if some of you are interested, I will show you.
> > > > > > 
> > > > > > Guillaume
> > > > > > 
> > > > > > –  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups “lynckia” group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > 
> > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > 
> > > > > –  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups “lynckia” group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > –  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups “lynckia” group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com) \<javascript:\>.  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

[licode\_config.js](https://discourse.lynckia.com/uploads/lynckia/original/1X/c0716b096f9886deb7d26fbc93d38bb335b42a2d.js) (1.59 KB)

[licode\_config.js](https://discourse.lynckia.com/uploads/lynckia/original/1X/c0716b096f9886deb7d26fbc93d38bb335b42a2d.js) (1.59 KB)

---

<div class="post-metadata">

**Author:** ![Jukka](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jukka](https://discourse.lynckia.com/u/Jukka)\
**Post date:** [November 25, 2013, 1:03pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/10 "2013-11-25T13:03:23Z")

</div>

Hi Wilbert,

It seems that your browser does not get connection to Erizo Controller when  
Erizo is behind NAT. Have you forwarded TCP 8080 (the default port of Erizo  
Controller for WebSockets) from your NAT to machine where Erizo Controller  
is running? Also, you need to make port forwarding for UDP ports to the  
same machine. You can limit the UDP ports in licode\_config.js. The log on  
my server is similar to your successful one (Good Connection) even when it  
is behind NAT.

- Jukka

maanantai, 25. marraskuuta 2013 14.03.56 UTC+2 Wilbert Jackson kirjoitti:\>

> Jukka,
> 
> Thanks for the info. I am unable to connect behind at NAT and have checked  
> that the role is set as presenter. My logs of good connection on our local  
> LAN and bad connection via the NAT are shown below. As you can see in the  
> case of the NAT connection the socket is never opened. Just curious as to  
> what your NAT connection log shows.
> 
> Thanks
> 
> Wilbert
> 
> Good Connection
> 
> New erizocontroller ( 1 ) in: 192.168.0.102  
> 2013-11-25T11:54:41.858Z - info: Queue erizoController\_1 is open  
> Representing rooms for service 528fa216e6616bd284f3788f  
> Created token for room 528fd6f4238a2a310c000001 and service  
> 528fa216e6616bd284f3788f  
> 2013-11-25T11:55:34.928Z - info: Socket connect Cn1BaKTC7VslZNzFHIqO  
> Consumed token 52933aa9730942a30a000001 from room  
> 528fd6f4238a2a310c000001 of service 528fa216e6616bd284f3788f  
> 2013-11-25T11:55:35.109Z - info: OK, Valid token  
> 2013-11-25T11:55:35.428Z - info: Adding publisher peer\_id  
> 79938927781768140  
> 2013-11-25 06:55:35,448 - WARN: WebRtcConnection - WebRtcConnection  
> constructor stunserver 173.194.68.127 stunPort 19302 minPort 0 maxPort 0
> 
> 2013-11-25 06:55:35,450 - INFO: WebRtcConnection - Update Transport State  
> video to 0  
> 2013-11-25 06:55:35,522 - INFO: WebRtcConnection - Update Transport State  
> audio to 0  
> 2013-11-25 06:55:35,524 - WARN: NiceConnection - Stun Server  
> 173.194.68.127:19302[http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA](http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA)  
> 2013-11-25 06:55:35,524 - WARN: NiceConnection - Stun Server  
> 173.194.68.127:19302[http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA](http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA)  
> 2013-11-25 06:55:35,567 - INFO: NiceConnection - candidate\_gathering done  
> with 2 candidates  
> 2013-11-25 06:55:35,567 - INFO: WebRtcConnection - Update Transport State  
> audio to 1  
> 2013-11-25 06:55:35,568 - INFO: WebRtcConnection - audio - Update  
> Transport State end, 1 - 0, -1770294787 - -855122084, 0 - 0  
> 2013-11-25 06:55:35,568 - INFO: NiceConnection - candidate\_gathering done  
> with 2 candidates  
> 2013-11-25 06:55:35,568 - INFO: WebRtcConnection - Update Transport State  
> video to 1  
> 2013-11-25 06:55:35,569 - INFO: WebRtcConnection - video - Update  
> Transport State end, 1 - 1, -1770294787 - -855122084, 1 - 0  
> 2013-11-25 06:55:36,225 - INFO: WebRtcConnection - Update Transport State  
> video to 2  
> 2013-11-25 06:55:36,225 - INFO: WebRtcConnection - Ready to send and  
> receive media  
> 2013-11-25 06:55:36,225 - INFO: WebRtcConnection - video - Update  
> Transport State end, 1 - 2, -1770294787 - -855122084, 2 - 1  
> 2013-11-25T11:55:36.228Z - info: Sending message to Cn1BaKTC7VslZNzFHIqO  
> in room 528fd6f4238a2a310c000001
> 
> Fails to Connect Over NAT
> 
> wil@wil-Inspiron-1525:~$ Created token for room 528fd6f4238a2a310c000001  
> and service 528fa216e6616bd284f3788f
> 
> On Mon, Nov 25, 2013 at 2:27 AM, Jukka \<[jukka....@gmail.com](mailto:jukka....@gmail.com) \<javascript:\>\>wrote:
> 
> > Hi,
> > 
> > I managed to get it running behind NAT but it works only on Chrome.  
> > Firefox gets the WebSocket connection and is able to exchange the SDPs with  
> > Erizo but the stream from Firefox client never reaches Erizo. However, with  
> > Chrome the stream is published succesfully. I haven’t figured out yet what  
> > is wrong with Firefox. I have all the necessary ports forwarded properly. I  
> > think it has something to do with the SDP Firefox creates.
> > 
> > To get it working I set the public IP manually and remembered to set user  
> > role to “presenter” (without that user does not have permission to publish  
> > streams).
> > 
> > - Jukka
> > 
> > lauantai, 23. marraskuuta 2013 18.53.15 UTC+2 Guillaume Lepinay  
> > kirjoitti:
> > 
> > > Hello Wilbert,
> > > 
> > > So finally even with all you said, it’s finally not working behind a NAT  
> > > ?  
> > > I’d like my project to be online at the beginning of december for a test  
> > > version, so I think the best is I use a server directly connected, with no  
> > > NAT for now ?
> > > 
> > > I will check if I can get one quickly to reinstall everything on it.  
> > > Thank you very much for you help.
> > > 
> > > Le samedi 23 novembre 2013 17:01:40 UTC+1, Wilbert Jackson a écrit :
> > > 
> > > > Guillanume,
> > > > 
> > > > In the licode/scripts directory there is the installNuve.sh listed,  
> > > > which is shown below. The way I see is working is it copies the  
> > > > licode\_default.js script, which is located in licode/scripts, to  
> > > > licode\_i.js then uses licode\_1.js to replace licode\_config.js. Before I  
> > > > came across this I would set licode\_cofig.js to configure the stun ip and  
> > > > port variables before starting the server and then noticed that after nuve  
> > > > was started the licode\_config.js stun variables I set earlier where blank.  
> > > > So I set the stun variables in licode\_default.js instead of  
> > > > licode\_config.js. In our system the stun server still does not work for  
> > > > remote client access as the stun server never gets called. Instead clients  
> > > > outside our of local network are doing http get to access the server using  
> > > > the server’s local ip address and port and thus fail to connect because the  
> > > > server disconnects socket initially established when the client room access  
> > > > was granted. Bottom line:
> > > > 
> > > > 1. From the server I see a remote client connect
> > > > 
> > > > 2. From the see the device info.
> > > > 
> > > > 3. From the server see the room access info
> > > > 
> > > > 4. Then from the server do not see any stun info and the server  
> > > > disconnects the client connection
> > > > 
> > > > 5. From the client see that it was trying to access the servers local  
> > > > ip address and port and fails, and stun server was never involved.
> > > > 
> > > > 6. Check licode\_config.js and I confirm the server ip and port are set.
> > > > 
> > > > I could be doing something wrong but have no idea what.
> > > > 
> > > > Wilbert
> > > > 
> > > > installNuve.sh
> > > > 
> > > > #!/bin/bash
> > > > 
> > > > SCRIPT=`pwd`/$0  
> > > > FILENAME=`basename $SCRIPT`  
> > > > PATHNAME=`dirname $SCRIPT`  
> > > > ROOT=$PATHNAME/…  
> > > > BUILD\_DIR=$ROOT/build  
> > > > CURRENT\_DIR=`pwd`  
> > > > DB\_DIR=“$BUILD\_DIR”/db
> > > > 
> > > > install\_nuve(){  
> > > > cd $ROOT/nuve  
> > > > ./installNuve.sh  
> > > > cd $CURRENT\_DIR  
> > > > }
> > > > 
> > > > populate\_mongo(){
> > > > 
> > > > echo [licode] Starting mongodb  
> > > > if [! -d “$DB\_DIR”]; then  
> > > > mkdir -p “$DB\_DIR”/db  
> > > > fi  
> > > > mongod --repair --dbpath $DB\_DIR  
> > > > mongod --dbpath $DB\_DIR --logpath $BUILD\_DIR/mongo.log --fork  
> > > > sleep 5
> > > > 
> > > > dbURL=`grep "config.nuve.dataBaseURL" $PATHNAME/licode_default.js`
> > > > 
> > > > dbURL=`echo $dbURL| cut -d'"' -f 2`  
> > > > dbURL=`echo $dbURL| cut -d'"' -f 1`
> > > > 
> > > > echo [licode] Creating superservice in $dbURL  
> > > > mongo $dbURL --eval “db.services.insert({name: ‘superService’, key:  
> > > > ‘$RANDOM’, rooms: })”  
> > > > SERVID=`mongo $dbURL --quiet --eval "db.services.findOne()._id"`  
> > > > SERVKEY=`mongo $dbURL --quiet --eval "db.services.findOne().key"`
> > > > 
> > > > SERVID=`echo $SERVID| cut -d'"' -f 2`  
> > > > SERVID=`echo $SERVID| cut -d'"' -f 1`
> > > > 
> > > > echo "Mongo Logs: "  
> > > > cat $BUILD\_DIR/mongo.log
> > > > 
> > > > echo [licode] SuperService ID $SERVID  
> > > > echo [licode] SuperService KEY $SERVKEY  
> > > > cd $BUILD\_DIR  
> > > > replacement=s/_auto\_generated\_ID_/${SERVID}/  
> > > > sed $replacement $PATHNAME/licode\_default.js \> $BUILD\_DIR/licode\_1.js  
> > > > replacement=s/_auto\_generated\_KEY_/${SERVKEY}/  
> > > > sed $replacement $BUILD\_DIR/licode\_1.js \> $ROOT/licode\_config.js  
> > > > rm $BUILD\_DIR/licode\_1.js  
> > > > }
> > > > 
> > > > install\_nuve  
> > > > populate\_mongo
> > > > 
> > > > On Sat, Nov 23, 2013 at 10:31 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > 
> > > > > Hello again, sorry sorry, I just notice that the licode\_default.js is  
> > > > > in the scripts directory (sorry again).  
> > > > > So I added the IP and port of the stun server inside this file, but  
> > > > > it’s still not working.
> > > > > 
> > > > > I joined my ./licode\_config.js and ./scripts/licode\_default.js
> > > > > 
> > > > > Thank you.  
> > > > > Guillaume
> > > > > 
> > > > > Le samedi 23 novembre 2013 16:01:07 UTC+1, Guillaume Lepinay a écrit :
> > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > Thank you for helping me, but i’m not sure I understand everything,  
> > > > > > because i’m not very good in english and about the configuration maybe…  
> > > > > > I tried to do this :
> > > > > > 
> > > > > > 1. I had no file called licode\_default.js, so I copied  
> > > > > > licode\_config.js to licode\_default.js (so now I have the 2 files at the  
> > > > > > same level).
> > > > > > 2. The 2 files are the same, and I joined them in my message, I hope  
> > > > > > you can take 1 minute to have a look.
> > > > > > 3. I set the IP and port of the stun server in both file.
> > > > > > 
> > > > > > When I start the server (./script/initLicode) I can see in the log  
> > > > > > Erizo is using the local address.  
> > > > > > I’m sorry if I didn’t do it correctly… please can you help me  
> > > > > > little bit more ?
> > > > > > 
> > > > > > Thank you.  
> > > > > > Guillaume
> > > > > > 
> > > > > > Le samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :
> > > > > > 
> > > > > > > We have only been able to set the licode\_config.js stun server ip  
> > > > > > > and port info by setting it in the the licode\_default.js when newly  
> > > > > > > starting the server. the nuve script takes the licode\_default settings and  
> > > > > > > uses them to replace the licode\_config.js settings. Are you sure  
> > > > > > > your licode\_config.js file has the server and ip info set? Even when we  
> > > > > > > set the licode\_config.js per Javier’s instructions the stun server  
> > > > > > > is not working for access outside of our local lan. Tried this many, many,  
> > > > > > > many times!
> > > > > > > 
> > > > > > > On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay \<[guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > > > > > 
> > > > > > > > Hello, I tried this settings, with the IP address :
> > > > > > > > 
> > > > > > > > _//STUN server IP address and port to be used by the server._  
> > > > > > > > _//if ‘’ is used, the address is discovered locally_  
> > > > > > > > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > > > > > > > _config.erizo.stunport = 19302;_
> > > > > > > > 
> > > > > > > > But still the same… Erizo controller starts using the local IP  
> > > > > > > > address, as I can see when I run ./script/initLicode.sh :  
> > > > > > > > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > > > > > > > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > > > > > > > 
> > > > > > > > Is there really now way to use it behind a nat… ?  
> > > > > > > > I’m starting the project, I can’t afford a server just for  
> > > > > > > > testing… and my current has 200Mbps bandwith… that’s why I would like to  
> > > > > > > > use it…  
> > > > > > > > I don’t know exactly how is the IP used after Erizo is started,  
> > > > > > > > because i’m not good enough for the network part… but is it possible just  
> > > > > > > > to specify the IP address we want in the config file ? or use another  
> > > > > > > > service like a simple webpage that returns the IP address of the host (we  
> > > > > > > > could specify this url in the licode\_config.js file ?
> > > > > > > > 
> > > > > > > > Thank you for your help… for now that’s the most blocking point  
> > > > > > > > for my project 🙂
> > > > > > > > 
> > > > > > > > Guillaume
> > > > > > > > 
> > > > > > > > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a  
> > > > > > > > écrit :
> > > > > > > > 
> > > > > > > > > Hi Guillaume,
> > > > > > > > > 
> > > > > > > > > Currently Erizo only supports setting the IP address (no DNS) in  
> > > > > > > > > the config.erizo.stunserver variable. Please, try with .
> > > > > > > > > 
> > > > > > > > > Cheers,  
> > > > > > > > > Javier.
> > > > > > > > > 
> > > > > > > > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > > 
> > > > > > > > > > Hello,
> > > > > > > > > > 
> > > > > > > > > > I just tried the STUN server configuration for Erizo.  
> > > > > > > > > > I’m using a virtual machine (VirtualBox). The host is Windows  
> > > > > > > > > > Server, directly connected to the internet (No NAT), and the guest is the  
> > > > > > > > > > Ubuntu that host the Licode server.
> > > > > > > > > > 
> > > > > > > > > > The virtual network for the guest is under a NAT (the virtualbox  
> > > > > > > > > > nat), because nothing else was working to connect the guest to the internet  
> > > > > > > > > > and use the host IP.
> > > > > > > > > > 
> > > > > > > > > > So I configured the settings like this in licode\_config.js :
> > > > > > > > > > 
> > > > > > > > > > //STUN server IP address and port to be used by the server.  
> > > > > > > > > > //if ‘’ is used, the address is discovered locally  
> > > > > > > > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > > > > > > > config.erizo.stunport = 19302;
> > > > > > > > > > 
> > > > > > > > > > But Erizo is still using the local address behind the nat,  
> > > > > > > > > > instead of the external address.  
> > > > > > > > > > Is there something else I should do ?
> > > > > > > > > > 
> > > > > > > > > > Thank you for your help.  
> > > > > > > > > > Guillaume
> > > > > > > > > > 
> > > > > > > > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > > > > > > > 
> > > > > > > > > > > Hi,
> > > > > > > > > > > 
> > > > > > > > > > > For the first question, Licode solves it for you. You only have  
> > > > > > > > > > > to send every stream once to Licode and Licode will forward it to several  
> > > > > > > > > > > users. So the answer is that it is handle natively by the server.
> > > > > > > > > > > 
> > > > > > > > > > > For the second question, the best solution would be not to use a  
> > > > > > > > > > > NAT device between ErizoController and the Internet, which I guess is your  
> > > > > > > > > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > > > > > > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > > > > > > > > corresponding lines:
> > > > > > > > > > > 
> > > > > > > > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > > > > > > > config.erizo.stunport = stun\_server\_port;
> > > > > > > > > > > 
> > > > > > > > > > > With your preferred stun server address and ports.
> > > > > > > > > > > 
> > > > > > > > > > > Cheers,  
> > > > > > > > > > > Javier.
> > > > > > > > > > > 
> > > > > > > > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > > > > 
> > > > > > > > > > > > Hello every body,
> > > > > > > > > > > > 
> > > > > > > > > > > > I have started working with Licode for 2 weeks now and i’m very  
> > > > > > > > > > > > happy with it.  
> > > > > > > > > > > > Thanks to your previous help I could start very well.
> > > > > > > > > > > > 
> > > > > > > > > > > > Now I have 2 questions.
> > > > > > > > > > > > 
> > > > > > > > > > > > _The most important question :_
> > > > > > > > > > > > 
> > > > > > > > > > > > If 10 users are in a room, and only 3 are viewed by other  
> > > > > > > > > > > > users, do the 10 users send their stream to the server or only the 3 who  
> > > > > > > > > > > > have at least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > > > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > > > > > > > by the server to save the bandwidth usage ?
> > > > > > > > > > > > 
> > > > > > > > > > > > _And second question :_
> > > > > > > > > > > > 
> > > > > > > > > > > > When I start licode with initLicode, I get this line in the log  
> > > > > > > > > > > > :  
> > > > > > > > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > > > > > > > 
> > > > > > > > > > > > 192.168.1.15 is the local address of the server, but how can I  
> > > > > > > > > > > > do to make it use the public address IP (viewed by Internet) to allow users  
> > > > > > > > > > > > from internet to connect, and not only users from the local network ?
> > > > > > > > > > > > 
> > > > > > > > > > > > Thank you very much for your help 🙂
> > > > > > > > > > > > 
> > > > > > > > > > > > With these information, I think I can have something ready in 1  
> > > > > > > > > > > > or 2 weeks, if some of you are interested, I will show you.
> > > > > > > > > > > > 
> > > > > > > > > > > > Guillaume
> > > > > > > > > > > > 
> > > > > > > > > > > > –  
> > > > > > > > > > > > You received this message because you are subscribed to the  
> > > > > > > > > > > > Google Groups “lynckia” group.  
> > > > > > > > > > > > To unsubscribe from this group and stop receiving emails from  
> > > > > > > > > > > > it, send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > > > > > > > 
> > > > > > > > > > > > For more options, visit [https://groups.google.com/grou](https://groups.google.com/grou)  
> > > > > > > > > > > > ps/opt\_out.
> > > > > > > > > > > 
> > > > > > > > > > > –  
> > > > > > > > > > > You received this message because you are subscribed to the  
> > > > > > > > > > > Google Groups “lynckia” group.  
> > > > > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > > > 
> > > > > > > > > –  
> > > > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > > > the Google Groups “lynckia” group.  
> > > > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > 
> > > > > > > –  
> > > > > > > You received this message because you are subscribed to a topic in the  
> > > > > > > Google Groups “lynckia” group.  
> > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > 
> > > > –  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups “lynckia” group.  
> > > > To unsubscribe from this topic, visit  
> > > > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > > > To unsubscribe from this group and all its topics, send an email to  
> > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com) \<javascript:\>.  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [November 23, 2013, 4:53pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/11 "2013-11-23T16:53:15Z")

</div>

Hello Wilbert,

So finally even with all you said, it’s finally not working behind a NAT ?  
I’d like my project to be online at the beginning of december for a test  
version, so I think the best is I use a server directly connected, with no  
NAT for now ?

I will check if I can get one quickly to reinstall everything on it.  
Thank you very much for you help.Le samedi 23 novembre 2013 17:01:40 UTC+1, Wilbert Jackson a écrit :

> Guillanume,
> 
> In the licode/scripts directory there is the installNuve.sh listed, which  
> is shown below. The way I see is working is it copies the licode\_default.js  
> script, which is located in licode/scripts, to licode\_i.js then uses  
> licode\_1.js to replace licode\_config.js. Before I came across this I would  
> set licode\_cofig.js to configure the stun ip and port variables before  
> starting the server and then noticed that after nuve was started the  
> licode\_config.js stun variables I set earlier where blank. So I set the  
> stun variables in licode\_default.js instead of licode\_config.js. In our  
> system the stun server still does not work for remote client access as the  
> stun server never gets called. Instead clients outside our of local network  
> are doing http get to access the server using the server’s local ip address  
> and port and thus fail to connect because the server disconnects socket  
> initially established when the client room access was granted. Bottom line:
> 
> 1. From the server I see a remote client connect
> 
> 2. From the see the device info.
> 
> 3. From the server see the room access info
> 
> 4. Then from the server do not see any stun info and the server  
> disconnects the client connection
> 
> 5. From the client see that it was trying to access the servers local ip  
> address and port and fails, and stun server was never involved.
> 
> 6. Check licode\_config.js and I confirm the server ip and port are set.
> 
> I could be doing something wrong but have no idea what.
> 
> Wilbert
> 
> installNuve.sh
> 
> #!/bin/bash
> 
> SCRIPT=`pwd`/$0  
> FILENAME=`basename $SCRIPT`  
> PATHNAME=`dirname $SCRIPT`  
> ROOT=$PATHNAME/…  
> BUILD\_DIR=$ROOT/build  
> CURRENT\_DIR=`pwd`  
> DB\_DIR=“$BUILD\_DIR”/db
> 
> install\_nuve(){  
> cd $ROOT/nuve  
> ./installNuve.sh  
> cd $CURRENT\_DIR  
> }
> 
> populate\_mongo(){
> 
> echo [licode] Starting mongodb  
> if [! -d “$DB\_DIR”]; then  
> mkdir -p “$DB\_DIR”/db  
> fi  
> mongod --repair --dbpath $DB\_DIR  
> mongod --dbpath $DB\_DIR --logpath $BUILD\_DIR/mongo.log --fork  
> sleep 5
> 
> dbURL=`grep "config.nuve.dataBaseURL" $PATHNAME/licode_default.js`
> 
> dbURL=`echo $dbURL| cut -d'"' -f 2`  
> dbURL=`echo $dbURL| cut -d'"' -f 1`
> 
> echo [licode] Creating superservice in $dbURL  
> mongo $dbURL --eval “db.services.insert({name: ‘superService’, key:  
> ‘$RANDOM’, rooms: })”  
> SERVID=`mongo $dbURL --quiet --eval "db.services.findOne()._id"`  
> SERVKEY=`mongo $dbURL --quiet --eval "db.services.findOne().key"`
> 
> SERVID=`echo $SERVID| cut -d'"' -f 2`  
> SERVID=`echo $SERVID| cut -d'"' -f 1`
> 
> echo "Mongo Logs: "  
> cat $BUILD\_DIR/mongo.log
> 
> echo [licode] SuperService ID $SERVID  
> echo [licode] SuperService KEY $SERVKEY  
> cd $BUILD\_DIR  
> replacement=s/_auto\_generated\_ID_/${SERVID}/  
> sed $replacement $PATHNAME/licode\_default.js \> $BUILD\_DIR/licode\_1.js  
> replacement=s/_auto\_generated\_KEY_/${SERVKEY}/  
> sed $replacement $BUILD\_DIR/licode\_1.js \> $ROOT/licode\_config.js  
> rm $BUILD\_DIR/licode\_1.js  
> }
> 
> install\_nuve  
> populate\_mongo
> 
> On Sat, Nov 23, 2013 at 10:31 AM, Guillaume Lepinay \<[guy...@gmail.com](mailto:guy...@gmail.com)\<javascript:\> wrote:
> 
> > Hello again, sorry sorry, I just notice that the licode\_default.js is in  
> > the scripts directory (sorry again).  
> > So I added the IP and port of the stun server inside this file, but it’s  
> > still not working.
> > 
> > I joined my ./licode\_config.js and ./scripts/licode\_default.js
> > 
> > Thank you.  
> > Guillaume
> > 
> > Le samedi 23 novembre 2013 16:01:07 UTC+1, Guillaume Lepinay a écrit :
> > 
> > > Hello,
> > > 
> > > Thank you for helping me, but i’m not sure I understand everything,  
> > > because i’m not very good in english and about the configuration maybe…  
> > > I tried to do this :
> > > 
> > > 1. I had no file called licode\_default.js, so I copied licode\_config.js  
> > > to licode\_default.js (so now I have the 2 files at the same level).
> > > 2. The 2 files are the same, and I joined them in my message, I hope you  
> > > can take 1 minute to have a look.
> > > 3. I set the IP and port of the stun server in both file.
> > > 
> > > When I start the server (./script/initLicode) I can see in the log Erizo  
> > > is using the local address.  
> > > I’m sorry if I didn’t do it correctly… please can you help me little  
> > > bit more ?
> > > 
> > > Thank you.  
> > > Guillaume
> > > 
> > > Le samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :
> > > 
> > > > We have only been able to set the licode\_config.js stun server ip and  
> > > > port info by setting it in the the licode\_default.js when newly starting  
> > > > the server. the nuve script takes the licode\_default settings and uses them  
> > > > to replace the licode\_config.js settings. Are you sure  
> > > > your licode\_config.js file has the server and ip info set? Even when we  
> > > > set the licode\_config.js per Javier’s instructions the stun server is  
> > > > not working for access outside of our local lan. Tried this many, many,  
> > > > many times!
> > > > 
> > > > On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > 
> > > > > Hello, I tried this settings, with the IP address :
> > > > > 
> > > > > _//STUN server IP address and port to be used by the server._  
> > > > > _//if ‘’ is used, the address is discovered locally_  
> > > > > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > > > > _config.erizo.stunport = 19302;_
> > > > > 
> > > > > But still the same… Erizo controller starts using the local IP  
> > > > > address, as I can see when I run ./script/initLicode.sh :  
> > > > > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > > > > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > > > > 
> > > > > Is there really now way to use it behind a nat… ?  
> > > > > I’m starting the project, I can’t afford a server just for testing…  
> > > > > and my current has 200Mbps bandwith… that’s why I would like to use it…  
> > > > > I don’t know exactly how is the IP used after Erizo is started,  
> > > > > because i’m not good enough for the network part… but is it possible just  
> > > > > to specify the IP address we want in the config file ? or use another  
> > > > > service like a simple webpage that returns the IP address of the host (we  
> > > > > could specify this url in the licode\_config.js file ?
> > > > > 
> > > > > Thank you for your help… for now that’s the most blocking point for  
> > > > > my project 🙂
> > > > > 
> > > > > Guillaume
> > > > > 
> > > > > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :
> > > > > 
> > > > > > Hi Guillaume,
> > > > > > 
> > > > > > Currently Erizo only supports setting the IP address (no DNS) in the config.erizo.stunserver  
> > > > > > variable. Please, try with .
> > > > > > 
> > > > > > Cheers,  
> > > > > > Javier.
> > > > > > 
> > > > > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > 
> > > > > > > Hello,
> > > > > > > 
> > > > > > > I just tried the STUN server configuration for Erizo.  
> > > > > > > I’m using a virtual machine (VirtualBox). The host is Windows  
> > > > > > > Server, directly connected to the internet (No NAT), and the guest is the  
> > > > > > > Ubuntu that host the Licode server.
> > > > > > > 
> > > > > > > The virtual network for the guest is under a NAT (the virtualbox  
> > > > > > > nat), because nothing else was working to connect the guest to the internet  
> > > > > > > and use the host IP.
> > > > > > > 
> > > > > > > So I configured the settings like this in licode\_config.js :
> > > > > > > 
> > > > > > > //STUN server IP address and port to be used by the server.  
> > > > > > > //if ‘’ is used, the address is discovered locally  
> > > > > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > > > > config.erizo.stunport = 19302;
> > > > > > > 
> > > > > > > But Erizo is still using the local address behind the nat, instead  
> > > > > > > of the external address.  
> > > > > > > Is there something else I should do ?
> > > > > > > 
> > > > > > > Thank you for your help.  
> > > > > > > Guillaume
> > > > > > > 
> > > > > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > > > > 
> > > > > > > > Hi,
> > > > > > > > 
> > > > > > > > For the first question, Licode solves it for you. You only have to  
> > > > > > > > send every stream once to Licode and Licode will forward it to several  
> > > > > > > > users. So the answer is that it is handle natively by the server.
> > > > > > > > 
> > > > > > > > For the second question, the best solution would be not to use a  
> > > > > > > > NAT device between ErizoController and the Internet, which I guess is your  
> > > > > > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > > > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > > > > > corresponding lines:
> > > > > > > > 
> > > > > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > > > > config.erizo.stunport = stun\_server\_port;
> > > > > > > > 
> > > > > > > > With your preferred stun server address and ports.
> > > > > > > > 
> > > > > > > > Cheers,  
> > > > > > > > Javier.
> > > > > > > > 
> > > > > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > 
> > > > > > > > > Hello every body,
> > > > > > > > > 
> > > > > > > > > I have started working with Licode for 2 weeks now and i’m very  
> > > > > > > > > happy with it.  
> > > > > > > > > Thanks to your previous help I could start very well.
> > > > > > > > > 
> > > > > > > > > Now I have 2 questions.
> > > > > > > > > 
> > > > > > > > > _The most important question :_
> > > > > > > > > 
> > > > > > > > > If 10 users are in a room, and only 3 are viewed by other users,  
> > > > > > > > > do the 10 users send their stream to the server or only the 3 who have at  
> > > > > > > > > least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > > > > by the server to save the bandwidth usage ?
> > > > > > > > > 
> > > > > > > > > _And second question :_
> > > > > > > > > 
> > > > > > > > > When I start licode with initLicode, I get this line in the log :  
> > > > > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > > > > 
> > > > > > > > > 192.168.1.15 is the local address of the server, but how can I do  
> > > > > > > > > to make it use the public address IP (viewed by Internet) to allow users  
> > > > > > > > > from internet to connect, and not only users from the local network ?
> > > > > > > > > 
> > > > > > > > > Thank you very much for your help 🙂
> > > > > > > > > 
> > > > > > > > > With these information, I think I can have something ready in 1 or  
> > > > > > > > > 2 weeks, if some of you are interested, I will show you.
> > > > > > > > > 
> > > > > > > > > Guillaume
> > > > > > > > > 
> > > > > > > > > –  
> > > > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > > > Groups “lynckia” group.  
> > > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > > > > 
> > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > > 
> > > > > > > > –  
> > > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > > Groups “lynckia” group.  
> > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > 
> > > > > > –  
> > > > > > You received this message because you are subscribed to a topic in the  
> > > > > > Google Groups “lynckia” group.  
> > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > 
> > > > –  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups “lynckia” group.  
> > > > To unsubscribe from this topic, visit  
> > > > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > > > To unsubscribe from this group and all its topics, send an email to  
> > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com) \<javascript:\>.  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Javier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/javier/32/20_2.png) [@Javier](https://discourse.lynckia.com/u/Javier)\
**Post date:** [November 22, 2013, 8:03pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/12 "2013-11-22T20:03:41Z")

</div>

Hi Guillaume,

Currently Erizo only supports setting the IP address (no DNS) in the  
config.erizo.stunserver  
variable. Please, try with .

Cheers,  
Javier.On 22 November 2013 16:08, Guillaume Lepinay [guyost@gmail.com](mailto:guyost@gmail.com) wrote:

> Hello,
> 
> I just tried the STUN server configuration for Erizo.  
> I’m using a virtual machine (VirtualBox). The host is Windows Server,  
> directly connected to the internet (No NAT), and the guest is the Ubuntu  
> that host the Licode server.
> 
> The virtual network for the guest is under a NAT (the virtualbox nat),  
> because nothing else was working to connect the guest to the internet and  
> use the host IP.
> 
> So I configured the settings like this in licode\_config.js :
> 
> //STUN server IP address and port to be used by the server.  
> //if ‘’ is used, the address is discovered locally  
> config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> config.erizo.stunport = 19302;
> 
> But Erizo is still using the local address behind the nat, instead of the  
> external address.  
> Is there something else I should do ?
> 
> Thank you for your help.  
> Guillaume
> 
> Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> 
> > Hi,
> > 
> > For the first question, Licode solves it for you. You only have to send  
> > every stream once to Licode and Licode will forward it to several users. So  
> > the answer is that it is handle natively by the server.
> > 
> > For the second question, the best solution would be not to use a NAT  
> > device between ErizoController and the Internet, which I guess is your  
> > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > You can check the licode\_config.js and put a configuration like this in the  
> > corresponding lines:
> > 
> > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > config.erizo.stunport = stun\_server\_port;
> > 
> > With your preferred stun server address and ports.
> > 
> > Cheers,  
> > Javier.
> > 
> > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > 
> > > Hello every body,
> > > 
> > > I have started working with Licode for 2 weeks now and i’m very happy  
> > > with it.  
> > > Thanks to your previous help I could start very well.
> > > 
> > > Now I have 2 questions.
> > > 
> > > _The most important question :_
> > > 
> > > If 10 users are in a room, and only 3 are viewed by other users, do the  
> > > 10 users send their stream to the server or only the 3 who have at least 1  
> > > subscriber ? Do I have to stop/restart publishing by myself depending to  
> > > the subsribers count for each stream, or is it handle natively by the  
> > > server to save the bandwidth usage ?
> > > 
> > > _And second question :_
> > > 
> > > When I start licode with initLicode, I get this line in the log :  
> > > New erizocontroller (1 ) in : 192.168.1.15.
> > > 
> > > 192.168.1.15 is the local address of the server, but how can I do to  
> > > make it use the public address IP (viewed by Internet) to allow users from  
> > > internet to connect, and not only users from the local network ?
> > > 
> > > Thank you very much for your help 🙂
> > > 
> > > With these information, I think I can have something ready in 1 or 2  
> > > weeks, if some of you are interested, I will show you.
> > > 
> > > Guillaume
> > > 
> > > –  
> > > You received this message because you are subscribed to the Google  
> > > Groups “lynckia” group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > –  
> > You received this message because you are subscribed to the Google Groups  
> > “lynckia” group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Guillaume\_Lepinay](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Guillaume\_Lepinay](https://discourse.lynckia.com/u/Guillaume_Lepinay)\
**Post date:** [November 23, 2013, 3:31pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/13 "2013-11-23T15:31:03Z")

</div>

Hello again, sorry sorry, I just notice that the licode\_default.js is in  
the scripts directory (sorry again).  
So I added the IP and port of the stun server inside this file, but it’s  
still not working.

I joined my ./licode\_config.js and ./scripts/licode\_default.js

Thank you.  
GuillaumeLe samedi 23 novembre 2013 16:01:07 UTC+1, Guillaume Lepinay a écrit :

> Hello,
> 
> Thank you for helping me, but i’m not sure I understand everything,  
> because i’m not very good in english and about the configuration maybe…  
> I tried to do this :
> 
> 1. I had no file called licode\_default.js, so I copied licode\_config.js to  
> licode\_default.js (so now I have the 2 files at the same level).
> 2. The 2 files are the same, and I joined them in my message, I hope you  
> can take 1 minute to have a look.
> 3. I set the IP and port of the stun server in both file.
> 
> When I start the server (./script/initLicode) I can see in the log Erizo  
> is using the local address.  
> I’m sorry if I didn’t do it correctly… please can you help me little bit  
> more ?
> 
> Thank you.  
> Guillaume
> 
> Le samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :
> 
> > We have only been able to set the licode\_config.js stun server ip and  
> > port info by setting it in the the licode\_default.js when newly starting  
> > the server. the nuve script takes the licode\_default settings and uses them  
> > to replace the licode\_config.js settings. Are you sure  
> > your licode\_config.js file has the server and ip info set? Even when we  
> > set the licode\_config.js per Javier’s instructions the stun server is  
> > not working for access outside of our local lan. Tried this many, many,  
> > many times!
> > 
> > On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > 
> > > Hello, I tried this settings, with the IP address :
> > > 
> > > _//STUN server IP address and port to be used by the server._  
> > > _//if ‘’ is used, the address is discovered locally_  
> > > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > > _config.erizo.stunport = 19302;_
> > > 
> > > But still the same… Erizo controller starts using the local IP  
> > > address, as I can see when I run ./script/initLicode.sh :  
> > > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > > 
> > > Is there really now way to use it behind a nat… ?  
> > > I’m starting the project, I can’t afford a server just for testing…  
> > > and my current has 200Mbps bandwith… that’s why I would like to use it…  
> > > I don’t know exactly how is the IP used after Erizo is started, because  
> > > i’m not good enough for the network part… but is it possible just to  
> > > specify the IP address we want in the config file ? or use another service  
> > > like a simple webpage that returns the IP address of the host (we could  
> > > specify this url in the licode\_config.js file ?
> > > 
> > > Thank you for your help… for now that’s the most blocking point for my  
> > > project 🙂
> > > 
> > > Guillaume
> > > 
> > > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :
> > > 
> > > > Hi Guillaume,
> > > > 
> > > > Currently Erizo only supports setting the IP address (no DNS) in the config.erizo.stunserver  
> > > > variable. Please, try with .
> > > > 
> > > > Cheers,  
> > > > Javier.
> > > > 
> > > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > I just tried the STUN server configuration for Erizo.  
> > > > > I’m using a virtual machine (VirtualBox). The host is Windows Server,  
> > > > > directly connected to the internet (No NAT), and the guest is the Ubuntu  
> > > > > that host the Licode server.
> > > > > 
> > > > > The virtual network for the guest is under a NAT (the virtualbox nat),  
> > > > > because nothing else was working to connect the guest to the internet and  
> > > > > use the host IP.
> > > > > 
> > > > > So I configured the settings like this in licode\_config.js :
> > > > > 
> > > > > //STUN server IP address and port to be used by the server.  
> > > > > //if ‘’ is used, the address is discovered locally  
> > > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > > config.erizo.stunport = 19302;
> > > > > 
> > > > > But Erizo is still using the local address behind the nat, instead of  
> > > > > the external address.  
> > > > > Is there something else I should do ?
> > > > > 
> > > > > Thank you for your help.  
> > > > > Guillaume
> > > > > 
> > > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > For the first question, Licode solves it for you. You only have to  
> > > > > > send every stream once to Licode and Licode will forward it to several  
> > > > > > users. So the answer is that it is handle natively by the server.
> > > > > > 
> > > > > > For the second question, the best solution would be not to use a NAT  
> > > > > > device between ErizoController and the Internet, which I guess is your  
> > > > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > > > corresponding lines:
> > > > > > 
> > > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > > config.erizo.stunport = stun\_server\_port;
> > > > > > 
> > > > > > With your preferred stun server address and ports.
> > > > > > 
> > > > > > Cheers,  
> > > > > > Javier.
> > > > > > 
> > > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > > > > 
> > > > > > > Hello every body,
> > > > > > > 
> > > > > > > I have started working with Licode for 2 weeks now and i’m very  
> > > > > > > happy with it.  
> > > > > > > Thanks to your previous help I could start very well.
> > > > > > > 
> > > > > > > Now I have 2 questions.
> > > > > > > 
> > > > > > > _The most important question :_
> > > > > > > 
> > > > > > > If 10 users are in a room, and only 3 are viewed by other users, do  
> > > > > > > the 10 users send their stream to the server or only the 3 who have at  
> > > > > > > least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > > by the server to save the bandwidth usage ?
> > > > > > > 
> > > > > > > _And second question :_
> > > > > > > 
> > > > > > > When I start licode with initLicode, I get this line in the log :  
> > > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > > 
> > > > > > > 192.168.1.15 is the local address of the server, but how can I do to  
> > > > > > > make it use the public address IP (viewed by Internet) to allow users from  
> > > > > > > internet to connect, and not only users from the local network ?
> > > > > > > 
> > > > > > > Thank you very much for your help 🙂
> > > > > > > 
> > > > > > > With these information, I think I can have something ready in 1 or 2  
> > > > > > > weeks, if some of you are interested, I will show you.
> > > > > > > 
> > > > > > > Guillaume
> > > > > > > 
> > > > > > > –  
> > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > Groups “lynckia” group.  
> > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > > 
> > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > 
> > > > > > –  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups “lynckia” group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > 
> > > > –  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups “lynckia” group.  
> > > > To unsubscribe from this topic, visit  
> > > > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > > > To unsubscribe from this group and all its topics, send an email to  
> > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

[licode\_config.js](https://discourse.lynckia.com/uploads/lynckia/original/1X/c0716b096f9886deb7d26fbc93d38bb335b42a2d.js) (1.59 KB)

[licode\_default.js](https://discourse.lynckia.com/uploads/lynckia/original/1X/e77cd9244b8e9b4a9b6e3dc581f79ac1aa75b886.js) (1.6 KB)

---

<div class="post-metadata">

**Author:** ![Wilbert\_Jackson](https://avatars.discourse-cdn.com/v4/letter/w/49beb7/32.png) [@Wilbert\_Jackson](https://discourse.lynckia.com/u/Wilbert_Jackson)\
**Post date:** [November 23, 2013, 1:48pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/14 "2013-11-23T13:48:27Z")

</div>

We have only been able to set the licode\_config.js stun server ip and port  
info by setting it in the the licode\_default.js when newly starting the  
server. the nuve script takes the licode\_default settings and uses them to  
replace the licode\_config.js settings. Are you sure your licode\_config.js  
file has the server and ip info set? Even when we set the licode\_config.js  
per Javier’s instructions the stun server is not working for access outside  
of our local lan. Tried this many, many, many times!On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay [guyost@gmail.com](mailto:guyost@gmail.com) wrote:

> Hello, I tried this settings, with the IP address :
> 
> _//STUN server IP address and port to be used by the server._  
> _//if ‘’ is used, the address is discovered locally_  
> _config.erizo.stunserver = ‘173.194.78.127 \<173.194.78.127\>’;_  
> _config.erizo.stunport = 19302;_
> 
> But still the same… Erizo controller starts using the local IP address,  
> as I can see when I run ./script/initLicode.sh :  
> _New erizocontroller ( 1 ) in: 10.0.2.15_  
> _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> 
> Is there really now way to use it behind a nat… ?  
> I’m starting the project, I can’t afford a server just for testing… and  
> my current has 200Mbps bandwith… that’s why I would like to use it…  
> I don’t know exactly how is the IP used after Erizo is started, because  
> i’m not good enough for the network part… but is it possible just to  
> specify the IP address we want in the config file ? or use another service  
> like a simple webpage that returns the IP address of the host (we could  
> specify this url in the licode\_config.js file ?
> 
> Thank you for your help… for now that’s the most blocking point for my  
> project 🙂
> 
> Guillaume
> 
> Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :
> 
> > Hi Guillaume,
> > 
> > Currently Erizo only supports setting the IP address (no DNS) in the config.erizo.stunserver  
> > variable. Please, try with .
> > 
> > Cheers,  
> > Javier.
> > 
> > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > 
> > > Hello,
> > > 
> > > I just tried the STUN server configuration for Erizo.  
> > > I’m using a virtual machine (VirtualBox). The host is Windows Server,  
> > > directly connected to the internet (No NAT), and the guest is the Ubuntu  
> > > that host the Licode server.
> > > 
> > > The virtual network for the guest is under a NAT (the virtualbox nat),  
> > > because nothing else was working to connect the guest to the internet and  
> > > use the host IP.
> > > 
> > > So I configured the settings like this in licode\_config.js :
> > > 
> > > //STUN server IP address and port to be used by the server.  
> > > //if ‘’ is used, the address is discovered locally  
> > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > config.erizo.stunport = 19302;
> > > 
> > > But Erizo is still using the local address behind the nat, instead of  
> > > the external address.  
> > > Is there something else I should do ?
> > > 
> > > Thank you for your help.  
> > > Guillaume
> > > 
> > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > 
> > > > Hi,
> > > > 
> > > > For the first question, Licode solves it for you. You only have to send  
> > > > every stream once to Licode and Licode will forward it to several users. So  
> > > > the answer is that it is handle natively by the server.
> > > > 
> > > > For the second question, the best solution would be not to use a NAT  
> > > > device between ErizoController and the Internet, which I guess is your  
> > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > corresponding lines:
> > > > 
> > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > config.erizo.stunport = stun\_server\_port;
> > > > 
> > > > With your preferred stun server address and ports.
> > > > 
> > > > Cheers,  
> > > > Javier.
> > > > 
> > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > > > 
> > > > > Hello every body,
> > > > > 
> > > > > I have started working with Licode for 2 weeks now and i’m very happy  
> > > > > with it.  
> > > > > Thanks to your previous help I could start very well.
> > > > > 
> > > > > Now I have 2 questions.
> > > > > 
> > > > > _The most important question :_
> > > > > 
> > > > > If 10 users are in a room, and only 3 are viewed by other users, do  
> > > > > the 10 users send their stream to the server or only the 3 who have at  
> > > > > least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > by the server to save the bandwidth usage ?
> > > > > 
> > > > > _And second question :_
> > > > > 
> > > > > When I start licode with initLicode, I get this line in the log :  
> > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > 
> > > > > 192.168.1.15 is the local address of the server, but how can I do to  
> > > > > make it use the public address IP (viewed by Internet) to allow users from  
> > > > > internet to connect, and not only users from the local network ?
> > > > > 
> > > > > Thank you very much for your help 🙂
> > > > > 
> > > > > With these information, I think I can have something ready in 1 or 2  
> > > > > weeks, if some of you are interested, I will show you.
> > > > > 
> > > > > Guillaume
> > > > > 
> > > > > –  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups “lynckia” group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > 
> > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > 
> > > > –  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups “lynckia” group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > –  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups “lynckia” group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Wilbert\_Jackson](https://avatars.discourse-cdn.com/v4/letter/w/49beb7/32.png) [@Wilbert\_Jackson](https://discourse.lynckia.com/u/Wilbert_Jackson)\
**Post date:** [November 25, 2013, 12:03pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/15 "2013-11-25T12:03:56Z")

</div>

Jukka,

Thanks for the info. I am unable to connect behind at NAT and have checked  
that the role is set as presenter. My logs of good connection on our local  
LAN and bad connection via the NAT are shown below. As you can see in the  
case of the NAT connection the socket is never opened. Just curious as to  
what your NAT connection log shows.

Thanks

Wilbert

Good Connection

New erizocontroller ( 1 ) in: 192.168.0.102  
2013-11-25T11:54:41.858Z - info: Queue erizoController\_1 is open  
Representing rooms for service 528fa216e6616bd284f3788f  
Created token for room 528fd6f4238a2a310c000001 and service  
528fa216e6616bd284f3788f  
2013-11-25T11:55:34.928Z - info: Socket connect Cn1BaKTC7VslZNzFHIqO  
Consumed token 52933aa9730942a30a000001 from room  
528fd6f4238a2a310c000001 of service 528fa216e6616bd284f3788f  
2013-11-25T11:55:35.109Z - info: OK, Valid token  
2013-11-25T11:55:35.428Z - info: Adding publisher peer\_id 79938927781768140  
2013-11-25 06:55:35,448 - WARN: WebRtcConnection - WebRtcConnection  
constructor stunserver 173.194.68.127 stunPort 19302 minPort 0 maxPort 0

2013-11-25 06:55:35,450 - INFO: WebRtcConnection - Update Transport State  
video to 0  
2013-11-25 06:55:35,522 - INFO: WebRtcConnection - Update Transport State  
audio to 0  
2013-11-25 06:55:35,524 - WARN: NiceConnection - Stun Server  
173.194.68.127:19302  
2013-11-25 06:55:35,524 - WARN: NiceConnection - Stun Server  
173.194.68.127:19302  
2013-11-25 06:55:35,567 - INFO: NiceConnection - candidate\_gathering done  
with 2 candidates  
2013-11-25 06:55:35,567 - INFO: WebRtcConnection - Update Transport State  
audio to 1  
2013-11-25 06:55:35,568 - INFO: WebRtcConnection - audio - Update  
Transport State end, 1 - 0, -1770294787 - -855122084, 0 - 0  
2013-11-25 06:55:35,568 - INFO: NiceConnection - candidate\_gathering done  
with 2 candidates  
2013-11-25 06:55:35,568 - INFO: WebRtcConnection - Update Transport State  
video to 1  
2013-11-25 06:55:35,569 - INFO: WebRtcConnection - video - Update  
Transport State end, 1 - 1, -1770294787 - -855122084, 1 - 0  
2013-11-25 06:55:36,225 - INFO: WebRtcConnection - Update Transport State  
video to 2  
2013-11-25 06:55:36,225 - INFO: WebRtcConnection - Ready to send and  
receive media  
2013-11-25 06:55:36,225 - INFO: WebRtcConnection - video - Update  
Transport State end, 1 - 2, -1770294787 - -855122084, 2 - 1  
2013-11-25T11:55:36.228Z - info: Sending message to Cn1BaKTC7VslZNzFHIqO in  
room 528fd6f4238a2a310c000001

Fails to Connect Over NAT

wil@wil-Inspiron-1525:~$ Created token for room 528fd6f4238a2a310c000001  
and service 528fa216e6616bd284f3788fOn Mon, Nov 25, 2013 at 2:27 AM, Jukka [jukka.mahonen@gmail.com](mailto:jukka.mahonen@gmail.com) wrote:

> Hi,
> 
> I managed to get it running behind NAT but it works only on Chrome.  
> Firefox gets the WebSocket connection and is able to exchange the SDPs with  
> Erizo but the stream from Firefox client never reaches Erizo. However, with  
> Chrome the stream is published succesfully. I haven’t figured out yet what  
> is wrong with Firefox. I have all the necessary ports forwarded properly. I  
> think it has something to do with the SDP Firefox creates.
> 
> To get it working I set the public IP manually and remembered to set user  
> role to “presenter” (without that user does not have permission to publish  
> streams).
> 
> - Jukka
> 
> lauantai, 23. marraskuuta 2013 18.53.15 UTC+2 Guillaume Lepinay kirjoitti:
> 
> > Hello Wilbert,
> > 
> > So finally even with all you said, it’s finally not working behind a NAT ?  
> > I’d like my project to be online at the beginning of december for a test  
> > version, so I think the best is I use a server directly connected, with no  
> > NAT for now ?
> > 
> > I will check if I can get one quickly to reinstall everything on it.  
> > Thank you very much for you help.
> > 
> > Le samedi 23 novembre 2013 17:01:40 UTC+1, Wilbert Jackson a écrit :
> > 
> > > Guillanume,
> > > 
> > > In the licode/scripts directory there is the installNuve.sh listed,  
> > > which is shown below. The way I see is working is it copies the  
> > > licode\_default.js script, which is located in licode/scripts, to  
> > > licode\_i.js then uses licode\_1.js to replace licode\_config.js. Before I  
> > > came across this I would set licode\_cofig.js to configure the stun ip and  
> > > port variables before starting the server and then noticed that after nuve  
> > > was started the licode\_config.js stun variables I set earlier where blank.  
> > > So I set the stun variables in licode\_default.js instead of  
> > > licode\_config.js. In our system the stun server still does not work for  
> > > remote client access as the stun server never gets called. Instead clients  
> > > outside our of local network are doing http get to access the server using  
> > > the server’s local ip address and port and thus fail to connect because the  
> > > server disconnects socket initially established when the client room access  
> > > was granted. Bottom line:
> > > 
> > > 1. From the server I see a remote client connect
> > > 
> > > 2. From the see the device info.
> > > 
> > > 3. From the server see the room access info
> > > 
> > > 4. Then from the server do not see any stun info and the server  
> > > disconnects the client connection
> > > 
> > > 5. From the client see that it was trying to access the servers local ip  
> > > address and port and fails, and stun server was never involved.
> > > 
> > > 6. Check licode\_config.js and I confirm the server ip and port are set.
> > > 
> > > I could be doing something wrong but have no idea what.
> > > 
> > > Wilbert
> > > 
> > > installNuve.sh
> > > 
> > > #!/bin/bash
> > > 
> > > SCRIPT=`pwd`/$0  
> > > FILENAME=`basename $SCRIPT`  
> > > PATHNAME=`dirname $SCRIPT`  
> > > ROOT=$PATHNAME/…  
> > > BUILD\_DIR=$ROOT/build  
> > > CURRENT\_DIR=`pwd`  
> > > DB\_DIR=“$BUILD\_DIR”/db
> > > 
> > > install\_nuve(){  
> > > cd $ROOT/nuve  
> > > ./installNuve.sh  
> > > cd $CURRENT\_DIR  
> > > }
> > > 
> > > populate\_mongo(){
> > > 
> > > echo [licode] Starting mongodb  
> > > if [! -d “$DB\_DIR”]; then  
> > > mkdir -p “$DB\_DIR”/db  
> > > fi  
> > > mongod --repair --dbpath $DB\_DIR  
> > > mongod --dbpath $DB\_DIR --logpath $BUILD\_DIR/mongo.log --fork  
> > > sleep 5
> > > 
> > > dbURL=`grep "config.nuve.dataBaseURL" $PATHNAME/licode_default.js`
> > > 
> > > dbURL=`echo $dbURL| cut -d'"' -f 2`  
> > > dbURL=`echo $dbURL| cut -d'"' -f 1`
> > > 
> > > echo [licode] Creating superservice in $dbURL  
> > > mongo $dbURL --eval “db.services.insert({name: ‘superService’, key:  
> > > ‘$RANDOM’, rooms: })”  
> > > SERVID=`mongo $dbURL --quiet --eval "db.services.findOne()._id"`  
> > > SERVKEY=`mongo $dbURL --quiet --eval "db.services.findOne().key"`
> > > 
> > > SERVID=`echo $SERVID| cut -d'"' -f 2`  
> > > SERVID=`echo $SERVID| cut -d'"' -f 1`
> > > 
> > > echo "Mongo Logs: "  
> > > cat $BUILD\_DIR/mongo.log
> > > 
> > > echo [licode] SuperService ID $SERVID  
> > > echo [licode] SuperService KEY $SERVKEY  
> > > cd $BUILD\_DIR  
> > > replacement=s/_auto\_generated\_ID_/${SERVID}/  
> > > sed $replacement $PATHNAME/licode\_default.js \> $BUILD\_DIR/licode\_1.js  
> > > replacement=s/_auto\_generated\_KEY_/${SERVKEY}/  
> > > sed $replacement $BUILD\_DIR/licode\_1.js \> $ROOT/licode\_config.js  
> > > rm $BUILD\_DIR/licode\_1.js  
> > > }
> > > 
> > > install\_nuve  
> > > populate\_mongo
> > > 
> > > On Sat, Nov 23, 2013 at 10:31 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > 
> > > > Hello again, sorry sorry, I just notice that the licode\_default.js is  
> > > > in the scripts directory (sorry again).  
> > > > So I added the IP and port of the stun server inside this file, but  
> > > > it’s still not working.
> > > > 
> > > > I joined my ./licode\_config.js and ./scripts/licode\_default.js
> > > > 
> > > > Thank you.  
> > > > Guillaume
> > > > 
> > > > Le samedi 23 novembre 2013 16:01:07 UTC+1, Guillaume Lepinay a écrit :
> > > > 
> > > > > Hello,
> > > > > 
> > > > > Thank you for helping me, but i’m not sure I understand everything,  
> > > > > because i’m not very good in english and about the configuration maybe…  
> > > > > I tried to do this :
> > > > > 
> > > > > 1. I had no file called licode\_default.js, so I copied  
> > > > > licode\_config.js to licode\_default.js (so now I have the 2 files at the  
> > > > > same level).
> > > > > 2. The 2 files are the same, and I joined them in my message, I hope  
> > > > > you can take 1 minute to have a look.
> > > > > 3. I set the IP and port of the stun server in both file.
> > > > > 
> > > > > When I start the server (./script/initLicode) I can see in the log  
> > > > > Erizo is using the local address.  
> > > > > I’m sorry if I didn’t do it correctly… please can you help me little  
> > > > > bit more ?
> > > > > 
> > > > > Thank you.  
> > > > > Guillaume
> > > > > 
> > > > > Le samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :
> > > > > 
> > > > > > We have only been able to set the licode\_config.js stun server ip and  
> > > > > > port info by setting it in the the licode\_default.js when newly starting  
> > > > > > the server. the nuve script takes the licode\_default settings and uses them  
> > > > > > to replace the licode\_config.js settings. Are you sure  
> > > > > > your licode\_config.js file has the server and ip info set? Even when we  
> > > > > > set the licode\_config.js per Javier’s instructions the stun server  
> > > > > > is not working for access outside of our local lan. Tried this many, many,  
> > > > > > many times!
> > > > > > 
> > > > > > On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > 
> > > > > > > Hello, I tried this settings, with the IP address :
> > > > > > > 
> > > > > > > _//STUN server IP address and port to be used by the server._  
> > > > > > > _//if ‘’ is used, the address is discovered locally_  
> > > > > > > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > > > > > > _config.erizo.stunport = 19302;_
> > > > > > > 
> > > > > > > But still the same… Erizo controller starts using the local IP  
> > > > > > > address, as I can see when I run ./script/initLicode.sh :  
> > > > > > > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > > > > > > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > > > > > > 
> > > > > > > Is there really now way to use it behind a nat… ?  
> > > > > > > I’m starting the project, I can’t afford a server just for  
> > > > > > > testing… and my current has 200Mbps bandwith… that’s why I would like to  
> > > > > > > use it…  
> > > > > > > I don’t know exactly how is the IP used after Erizo is started,  
> > > > > > > because i’m not good enough for the network part… but is it possible just  
> > > > > > > to specify the IP address we want in the config file ? or use another  
> > > > > > > service like a simple webpage that returns the IP address of the host (we  
> > > > > > > could specify this url in the licode\_config.js file ?
> > > > > > > 
> > > > > > > Thank you for your help… for now that’s the most blocking point  
> > > > > > > for my project 🙂
> > > > > > > 
> > > > > > > Guillaume
> > > > > > > 
> > > > > > > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a écrit :
> > > > > > > 
> > > > > > > > Hi Guillaume,
> > > > > > > > 
> > > > > > > > Currently Erizo only supports setting the IP address (no DNS) in  
> > > > > > > > the config.erizo.stunserver variable. Please, try with .
> > > > > > > > 
> > > > > > > > Cheers,  
> > > > > > > > Javier.
> > > > > > > > 
> > > > > > > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > 
> > > > > > > > > Hello,
> > > > > > > > > 
> > > > > > > > > I just tried the STUN server configuration for Erizo.  
> > > > > > > > > I’m using a virtual machine (VirtualBox). The host is Windows  
> > > > > > > > > Server, directly connected to the internet (No NAT), and the guest is the  
> > > > > > > > > Ubuntu that host the Licode server.
> > > > > > > > > 
> > > > > > > > > The virtual network for the guest is under a NAT (the virtualbox  
> > > > > > > > > nat), because nothing else was working to connect the guest to the internet  
> > > > > > > > > and use the host IP.
> > > > > > > > > 
> > > > > > > > > So I configured the settings like this in licode\_config.js :
> > > > > > > > > 
> > > > > > > > > //STUN server IP address and port to be used by the server.  
> > > > > > > > > //if ‘’ is used, the address is discovered locally  
> > > > > > > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > > > > > > config.erizo.stunport = 19302;
> > > > > > > > > 
> > > > > > > > > But Erizo is still using the local address behind the nat, instead  
> > > > > > > > > of the external address.  
> > > > > > > > > Is there something else I should do ?
> > > > > > > > > 
> > > > > > > > > Thank you for your help.  
> > > > > > > > > Guillaume
> > > > > > > > > 
> > > > > > > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > > > > > > 
> > > > > > > > > > Hi,
> > > > > > > > > > 
> > > > > > > > > > For the first question, Licode solves it for you. You only have  
> > > > > > > > > > to send every stream once to Licode and Licode will forward it to several  
> > > > > > > > > > users. So the answer is that it is handle natively by the server.
> > > > > > > > > > 
> > > > > > > > > > For the second question, the best solution would be not to use a  
> > > > > > > > > > NAT device between ErizoController and the Internet, which I guess is your  
> > > > > > > > > > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > > > > > > > > > You can check the licode\_config.js and put a configuration like this in the  
> > > > > > > > > > corresponding lines:
> > > > > > > > > > 
> > > > > > > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > > > > > > config.erizo.stunport = stun\_server\_port;
> > > > > > > > > > 
> > > > > > > > > > With your preferred stun server address and ports.
> > > > > > > > > > 
> > > > > > > > > > Cheers,  
> > > > > > > > > > Javier.
> > > > > > > > > > 
> > > > > > > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > > > 
> > > > > > > > > > > Hello every body,
> > > > > > > > > > > 
> > > > > > > > > > > I have started working with Licode for 2 weeks now and i’m very  
> > > > > > > > > > > happy with it.  
> > > > > > > > > > > Thanks to your previous help I could start very well.
> > > > > > > > > > > 
> > > > > > > > > > > Now I have 2 questions.
> > > > > > > > > > > 
> > > > > > > > > > > _The most important question :_
> > > > > > > > > > > 
> > > > > > > > > > > If 10 users are in a room, and only 3 are viewed by other users,  
> > > > > > > > > > > do the 10 users send their stream to the server or only the 3 who have at  
> > > > > > > > > > > least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > > > > > > by the server to save the bandwidth usage ?
> > > > > > > > > > > 
> > > > > > > > > > > _And second question :_
> > > > > > > > > > > 
> > > > > > > > > > > When I start licode with initLicode, I get this line in the log :  
> > > > > > > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > > > > > > 
> > > > > > > > > > > 192.168.1.15 is the local address of the server, but how can I  
> > > > > > > > > > > do to make it use the public address IP (viewed by Internet) to allow users  
> > > > > > > > > > > from internet to connect, and not only users from the local network ?
> > > > > > > > > > > 
> > > > > > > > > > > Thank you very much for your help 🙂
> > > > > > > > > > > 
> > > > > > > > > > > With these information, I think I can have something ready in 1  
> > > > > > > > > > > or 2 weeks, if some of you are interested, I will show you.
> > > > > > > > > > > 
> > > > > > > > > > > Guillaume
> > > > > > > > > > > 
> > > > > > > > > > > –  
> > > > > > > > > > > You received this message because you are subscribed to the  
> > > > > > > > > > > Google Groups “lynckia” group.  
> > > > > > > > > > > To unsubscribe from this group and stop receiving emails from  
> > > > > > > > > > > it, send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > > > > > > 
> > > > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > > > > > > > .
> > > > > > > > > > 
> > > > > > > > > > –  
> > > > > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > > > > Groups “lynckia” group.  
> > > > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > > > send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > > 
> > > > > > > > –  
> > > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > > the Google Groups “lynckia” group.  
> > > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/to](https://groups.google.com/d/to)  
> > > > > > > > pic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > 
> > > > > > –  
> > > > > > You received this message because you are subscribed to a topic in the  
> > > > > > Google Groups “lynckia” group.  
> > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > –  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups “lynckia” group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Wilbert\_Jackson](https://avatars.discourse-cdn.com/v4/letter/w/49beb7/32.png) [@Wilbert\_Jackson](https://discourse.lynckia.com/u/Wilbert_Jackson)\
**Post date:** [November 25, 2013, 5:06pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/16 "2013-11-25T17:06:24Z")

</div>

Jukka,

Thanks

I got it to work only by changing the Erizo.js options host field to our  
routers assigned DNS name or IP address. Otherwise on our system Erizo.js  
has the client connecting to the Erizo Server local network IP address  
which causes the remote client to fail to connect.

In Erizo,j I changed the e.host to our routers assigned DNS name  
e.host = “changed to our routers dns name”;  
f = c.util.uniqueUri(e);  
var i = {  
host: e.host,  
secure: “https” == e.protocol,  
port: e.port || (“https” == e.protocol ? 443 : 80),  
query: e.query || “”  
};On Mon, Nov 25, 2013 at 8:03 AM, Jukka [jukka.mahonen@gmail.com](mailto:jukka.mahonen@gmail.com) wrote:

> Hi Wilbert,
> 
> It seems that your browser does not get connection to Erizo Controller  
> when Erizo is behind NAT. Have you forwarded TCP 8080 (the default port of  
> Erizo Controller for WebSockets) from your NAT to machine where Erizo  
> Controller is running? Also, you need to make port forwarding for UDP ports  
> to the same machine. You can limit the UDP ports in licode\_config.js. The  
> log on my server is similar to your successful one (Good Connection) even  
> when it is behind NAT.
> 
> - Jukka
> 
> maanantai, 25. marraskuuta 2013 14.03.56 UTC+2 Wilbert Jackson kirjoitti:
> 
> > Jukka,
> > 
> > Thanks for the info. I am unable to connect behind at NAT and have  
> > checked that the role is set as presenter. My logs of good connection on  
> > our local LAN and bad connection via the NAT are shown below. As you can  
> > see in the case of the NAT connection the socket is never opened. Just  
> > curious as to what your NAT connection log shows.
> > 
> > Thanks
> > 
> > Wilbert
> > 
> > Good Connection
> > 
> > New erizocontroller ( 1 ) in: 192.168.0.102  
> > 2013-11-25T11:54:41.858Z - info: Queue erizoController\_1 is open  
> > Representing rooms for service 528fa216e6616bd284f3788f  
> > Created token for room 528fd6f4238a2a310c000001 and service  
> > 528fa216e6616bd284f3788f  
> > 2013-11-25T11:55:34.928Z - info: Socket connect Cn1BaKTC7VslZNzFHIqO  
> > Consumed token 52933aa9730942a30a000001 from room  
> > 528fd6f4238a2a310c000001 of service 528fa216e6616bd284f3788f  
> > 2013-11-25T11:55:35.109Z - info: OK, Valid token  
> > 2013-11-25T11:55:35.428Z - info: Adding publisher peer\_id  
> > 79938927781768140  
> > 2013-11-25 06:55:35,448 - WARN: WebRtcConnection - WebRtcConnection  
> > constructor stunserver 173.194.68.127 stunPort 19302 minPort 0 maxPort 0
> > 
> > 2013-11-25 06:55:35,450 - INFO: WebRtcConnection - Update Transport  
> > State video to 0  
> > 2013-11-25 06:55:35,522 - INFO: WebRtcConnection - Update Transport  
> > State audio to 0  
> > 2013-11-25 06:55:35,524 - WARN: NiceConnection - Stun Server  
> > 173.194.68.127:19302[http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA](http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA)  
> > 2013-11-25 06:55:35,524 - WARN: NiceConnection - Stun Server  
> > 173.194.68.127:19302[http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA](http://www.google.com/url?q=http%3A%2F%2F173.194.68.127%3A19302&sa=D&sntz=1&usg=AFQjCNEHApdbVJhB7EA1hm6XhIX1XlA1OA)  
> > 2013-11-25 06:55:35,567 - INFO: NiceConnection - candidate\_gathering  
> > done with 2 candidates  
> > 2013-11-25 06:55:35,567 - INFO: WebRtcConnection - Update Transport  
> > State audio to 1  
> > 2013-11-25 06:55:35,568 - INFO: WebRtcConnection - audio - Update  
> > Transport State end, 1 - 0, -1770294787 - -855122084, 0 - 0  
> > 2013-11-25 06:55:35,568 - INFO: NiceConnection - candidate\_gathering  
> > done with 2 candidates  
> > 2013-11-25 06:55:35,568 - INFO: WebRtcConnection - Update Transport  
> > State video to 1  
> > 2013-11-25 06:55:35,569 - INFO: WebRtcConnection - video - Update  
> > Transport State end, 1 - 1, -1770294787 - -855122084, 1 - 0  
> > 2013-11-25 06:55:36,225 - INFO: WebRtcConnection - Update Transport  
> > State video to 2  
> > 2013-11-25 06:55:36,225 - INFO: WebRtcConnection - Ready to send and  
> > receive media  
> > 2013-11-25 06:55:36,225 - INFO: WebRtcConnection - video - Update  
> > Transport State end, 1 - 2, -1770294787 - -855122084, 2 - 1  
> > 2013-11-25T11:55:36.228Z - info: Sending message to Cn1BaKTC7VslZNzFHIqO  
> > in room 528fd6f4238a2a310c000001
> > 
> > Fails to Connect Over NAT
> > 
> > wil@wil-Inspiron-1525:~$ Created token for room  
> > 528fd6f4238a2a310c000001 and service 528fa216e6616bd284f3788f
> > 
> > On Mon, Nov 25, 2013 at 2:27 AM, Jukka [jukka....@gmail.com](mailto:jukka....@gmail.com) wrote:
> > 
> > > Hi,
> > > 
> > > I managed to get it running behind NAT but it works only on Chrome.  
> > > Firefox gets the WebSocket connection and is able to exchange the SDPs with  
> > > Erizo but the stream from Firefox client never reaches Erizo. However, with  
> > > Chrome the stream is published succesfully. I haven’t figured out yet what  
> > > is wrong with Firefox. I have all the necessary ports forwarded properly. I  
> > > think it has something to do with the SDP Firefox creates.
> > > 
> > > To get it working I set the public IP manually and remembered to set  
> > > user role to “presenter” (without that user does not have permission to  
> > > publish streams).
> > > 
> > > - Jukka
> > > 
> > > lauantai, 23. marraskuuta 2013 18.53.15 UTC+2 Guillaume Lepinay  
> > > kirjoitti:
> > > 
> > > > Hello Wilbert,
> > > > 
> > > > So finally even with all you said, it’s finally not working behind a  
> > > > NAT ?  
> > > > I’d like my project to be online at the beginning of december for a  
> > > > test version, so I think the best is I use a server directly connected,  
> > > > with no NAT for now ?
> > > > 
> > > > I will check if I can get one quickly to reinstall everything on it.  
> > > > Thank you very much for you help.
> > > > 
> > > > Le samedi 23 novembre 2013 17:01:40 UTC+1, Wilbert Jackson a écrit :
> > > > 
> > > > > Guillanume,
> > > > > 
> > > > > In the licode/scripts directory there is the installNuve.sh listed,  
> > > > > which is shown below. The way I see is working is it copies the  
> > > > > licode\_default.js script, which is located in licode/scripts, to  
> > > > > licode\_i.js then uses licode\_1.js to replace licode\_config.js. Before I  
> > > > > came across this I would set licode\_cofig.js to configure the stun ip and  
> > > > > port variables before starting the server and then noticed that after nuve  
> > > > > was started the licode\_config.js stun variables I set earlier where blank.  
> > > > > So I set the stun variables in licode\_default.js instead of  
> > > > > licode\_config.js. In our system the stun server still does not work for  
> > > > > remote client access as the stun server never gets called. Instead clients  
> > > > > outside our of local network are doing http get to access the server using  
> > > > > the server’s local ip address and port and thus fail to connect because the  
> > > > > server disconnects socket initially established when the client room access  
> > > > > was granted. Bottom line:
> > > > > 
> > > > > 1. From the server I see a remote client connect
> > > > > 
> > > > > 2. From the see the device info.
> > > > > 
> > > > > 3. From the server see the room access info
> > > > > 
> > > > > 4. Then from the server do not see any stun info and the server  
> > > > > disconnects the client connection
> > > > > 
> > > > > 5. From the client see that it was trying to access the servers local  
> > > > > ip address and port and fails, and stun server was never involved.
> > > > > 
> > > > > 6. Check licode\_config.js and I confirm the server ip and port are set.
> > > > > 
> > > > > I could be doing something wrong but have no idea what.
> > > > > 
> > > > > Wilbert
> > > > > 
> > > > > installNuve.sh
> > > > > 
> > > > > #!/bin/bash
> > > > > 
> > > > > SCRIPT=`pwd`/$0  
> > > > > FILENAME=`basename $SCRIPT`  
> > > > > PATHNAME=`dirname $SCRIPT`  
> > > > > ROOT=$PATHNAME/…  
> > > > > BUILD\_DIR=$ROOT/build  
> > > > > CURRENT\_DIR=`pwd`  
> > > > > DB\_DIR=“$BUILD\_DIR”/db
> > > > > 
> > > > > install\_nuve(){  
> > > > > cd $ROOT/nuve  
> > > > > ./installNuve.sh  
> > > > > cd $CURRENT\_DIR  
> > > > > }
> > > > > 
> > > > > populate\_mongo(){
> > > > > 
> > > > > echo [licode] Starting mongodb  
> > > > > if [! -d “$DB\_DIR”]; then  
> > > > > mkdir -p “$DB\_DIR”/db  
> > > > > fi  
> > > > > mongod --repair --dbpath $DB\_DIR  
> > > > > mongod --dbpath $DB\_DIR --logpath $BUILD\_DIR/mongo.log --fork  
> > > > > sleep 5
> > > > > 
> > > > > dbURL=`grep "config.nuve.dataBaseURL" $PATHNAME/licode_default.js`
> > > > > 
> > > > > dbURL=`echo $dbURL| cut -d'"' -f 2`  
> > > > > dbURL=`echo $dbURL| cut -d'"' -f 1`
> > > > > 
> > > > > echo [licode] Creating superservice in $dbURL  
> > > > > mongo $dbURL --eval “db.services.insert({name: ‘superService’, key:  
> > > > > ‘$RANDOM’, rooms: })”  
> > > > > SERVID=`mongo $dbURL --quiet --eval "db.services.findOne()._id"`  
> > > > > SERVKEY=`mongo $dbURL --quiet --eval "db.services.findOne().key"`
> > > > > 
> > > > > SERVID=`echo $SERVID| cut -d'"' -f 2`  
> > > > > SERVID=`echo $SERVID| cut -d'"' -f 1`
> > > > > 
> > > > > echo "Mongo Logs: "  
> > > > > cat $BUILD\_DIR/mongo.log
> > > > > 
> > > > > echo [licode] SuperService ID $SERVID  
> > > > > echo [licode] SuperService KEY $SERVKEY  
> > > > > cd $BUILD\_DIR  
> > > > > replacement=s/_auto\_generated\_ID_/${SERVID}/  
> > > > > sed $replacement $PATHNAME/licode\_default.js \> $BUILD\_DIR/licode\_1.js  
> > > > > replacement=s/_auto\_generated\_KEY_/${SERVKEY}/  
> > > > > sed $replacement $BUILD\_DIR/licode\_1.js \> $ROOT/licode\_config.js  
> > > > > rm $BUILD\_DIR/licode\_1.js  
> > > > > }
> > > > > 
> > > > > install\_nuve  
> > > > > populate\_mongo
> > > > > 
> > > > > On Sat, Nov 23, 2013 at 10:31 AM, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > 
> > > > > > Hello again, sorry sorry, I just notice that the licode\_default.js is  
> > > > > > in the scripts directory (sorry again).  
> > > > > > So I added the IP and port of the stun server inside this file, but  
> > > > > > it’s still not working.
> > > > > > 
> > > > > > I joined my ./licode\_config.js and ./scripts/licode\_default.js
> > > > > > 
> > > > > > Thank you.  
> > > > > > Guillaume
> > > > > > 
> > > > > > Le samedi 23 novembre 2013 16:01:07 UTC+1, Guillaume Lepinay a écrit :
> > > > > > 
> > > > > > > Hello,
> > > > > > > 
> > > > > > > Thank you for helping me, but i’m not sure I understand everything,  
> > > > > > > because i’m not very good in english and about the configuration maybe…  
> > > > > > > I tried to do this :
> > > > > > > 
> > > > > > > 1. I had no file called licode\_default.js, so I copied  
> > > > > > > licode\_config.js to licode\_default.js (so now I have the 2 files at the  
> > > > > > > same level).
> > > > > > > 2. The 2 files are the same, and I joined them in my message, I hope  
> > > > > > > you can take 1 minute to have a look.
> > > > > > > 3. I set the IP and port of the stun server in both file.
> > > > > > > 
> > > > > > > When I start the server (./script/initLicode) I can see in the log  
> > > > > > > Erizo is using the local address.  
> > > > > > > I’m sorry if I didn’t do it correctly… please can you help me  
> > > > > > > little bit more ?
> > > > > > > 
> > > > > > > Thank you.  
> > > > > > > Guillaume
> > > > > > > 
> > > > > > > Le samedi 23 novembre 2013 14:48:27 UTC+1, Wilbert Jackson a écrit :
> > > > > > > 
> > > > > > > > We have only been able to set the licode\_config.js stun server ip  
> > > > > > > > and port info by setting it in the the licode\_default.js when newly  
> > > > > > > > starting the server. the nuve script takes the licode\_default settings and  
> > > > > > > > uses them to replace the licode\_config.js settings. Are you sure  
> > > > > > > > your licode\_config.js file has the server and ip info set? Even when we  
> > > > > > > > set the licode\_config.js per Javier’s instructions the stun server  
> > > > > > > > is not working for access outside of our local lan. Tried this many, many,  
> > > > > > > > many times!
> > > > > > > > 
> > > > > > > > On Sat, Nov 23, 2013 at 8:34 AM, Guillaume Lepinay \< [guy...@gmail.com](mailto:guy...@gmail.com)\> wrote:
> > > > > > > > 
> > > > > > > > > Hello, I tried this settings, with the IP address :
> > > > > > > > > 
> > > > > > > > > _//STUN server IP address and port to be used by the server._  
> > > > > > > > > _//if ‘’ is used, the address is discovered locally_  
> > > > > > > > > _config.erizo.stunserver = ‘173.194.78.127’;_  
> > > > > > > > > _config.erizo.stunport = 19302;_
> > > > > > > > > 
> > > > > > > > > But still the same… Erizo controller starts using the local IP  
> > > > > > > > > address, as I can see when I run ./script/initLicode.sh :  
> > > > > > > > > _New erizocontroller ( 1 ) in: 10.0.2.15_  
> > > > > > > > > _2013-11-23T13:27:25.214Z - info: Queue erizoController\_1 is open_
> > > > > > > > > 
> > > > > > > > > Is there really now way to use it behind a nat… ?  
> > > > > > > > > I’m starting the project, I can’t afford a server just for  
> > > > > > > > > testing… and my current has 200Mbps bandwith… that’s why I would like to  
> > > > > > > > > use it…  
> > > > > > > > > I don’t know exactly how is the IP used after Erizo is started,  
> > > > > > > > > because i’m not good enough for the network part… but is it possible just  
> > > > > > > > > to specify the IP address we want in the config file ? or use another  
> > > > > > > > > service like a simple webpage that returns the IP address of the host (we  
> > > > > > > > > could specify this url in the licode\_config.js file ?
> > > > > > > > > 
> > > > > > > > > Thank you for your help… for now that’s the most blocking point  
> > > > > > > > > for my project 🙂
> > > > > > > > > 
> > > > > > > > > Guillaume
> > > > > > > > > 
> > > > > > > > > Le vendredi 22 novembre 2013 21:03:41 UTC+1, Javier Cerviño a  
> > > > > > > > > écrit :
> > > > > > > > > 
> > > > > > > > > > Hi Guillaume,
> > > > > > > > > > 
> > > > > > > > > > Currently Erizo only supports setting the IP address (no DNS) in  
> > > > > > > > > > the config.erizo.stunserver variable. Please, try with .
> > > > > > > > > > 
> > > > > > > > > > Cheers,  
> > > > > > > > > > Javier.
> > > > > > > > > > 
> > > > > > > > > > On 22 November 2013 16:08, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > > > 
> > > > > > > > > > > Hello,
> > > > > > > > > > > 
> > > > > > > > > > > I just tried the STUN server configuration for Erizo.  
> > > > > > > > > > > I’m using a virtual machine (VirtualBox). The host is Windows  
> > > > > > > > > > > Server, directly connected to the internet (No NAT), and the guest is the  
> > > > > > > > > > > Ubuntu that host the Licode server.
> > > > > > > > > > > 
> > > > > > > > > > > The virtual network for the guest is under a NAT (the virtualbox  
> > > > > > > > > > > nat), because nothing else was working to connect the guest to the internet  
> > > > > > > > > > > and use the host IP.
> > > > > > > > > > > 
> > > > > > > > > > > So I configured the settings like this in licode\_config.js :
> > > > > > > > > > > 
> > > > > > > > > > > //STUN server IP address and port to be used by the server.  
> > > > > > > > > > > //if ‘’ is used, the address is discovered locally  
> > > > > > > > > > > config.erizo.stunserver = ‘[stun3.l.google.com](http://stun3.l.google.com)’;  
> > > > > > > > > > > config.erizo.stunport = 19302;
> > > > > > > > > > > 
> > > > > > > > > > > But Erizo is still using the local address behind the nat,  
> > > > > > > > > > > instead of the external address.  
> > > > > > > > > > > Is there something else I should do ?
> > > > > > > > > > > 
> > > > > > > > > > > Thank you for your help.  
> > > > > > > > > > > Guillaume
> > > > > > > > > > > 
> > > > > > > > > > > Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> > > > > > > > > > > 
> > > > > > > > > > > > Hi,
> > > > > > > > > > > > 
> > > > > > > > > > > > For the first question, Licode solves it for you. You only have  
> > > > > > > > > > > > to send every stream once to Licode and Licode will forward it to several  
> > > > > > > > > > > > users. So the answer is that it is handle natively by the server.
> > > > > > > > > > > > 
> > > > > > > > > > > > For the second question, the best solution would be not to use  
> > > > > > > > > > > > a NAT device between ErizoController and the Internet, which I guess is  
> > > > > > > > > > > > your scenario. But you can also configure Erizo Controller to use a STUN  
> > > > > > > > > > > > server. You can check the licode\_config.js and put a configuration like  
> > > > > > > > > > > > this in the corresponding lines:
> > > > > > > > > > > > 
> > > > > > > > > > > > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > > > > > > > > > > > config.erizo.stunport = stun\_server\_port;
> > > > > > > > > > > > 
> > > > > > > > > > > > With your preferred stun server address and ports.
> > > > > > > > > > > > 
> > > > > > > > > > > > Cheers,  
> > > > > > > > > > > > Javier.
> > > > > > > > > > > > 
> > > > > > > > > > > > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com)wrote:
> > > > > > > > > > > > 
> > > > > > > > > > > > > Hello every body,
> > > > > > > > > > > > > 
> > > > > > > > > > > > > I have started working with Licode for 2 weeks now and i’m  
> > > > > > > > > > > > > very happy with it.  
> > > > > > > > > > > > > Thanks to your previous help I could start very well.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > Now I have 2 questions.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > _The most important question :_
> > > > > > > > > > > > > 
> > > > > > > > > > > > > If 10 users are in a room, and only 3 are viewed by other  
> > > > > > > > > > > > > users, do the 10 users send their stream to the server or only the 3 who  
> > > > > > > > > > > > > have at least 1 subscriber ? Do I have to stop/restart publishing by myself  
> > > > > > > > > > > > > depending to the subsribers count for each stream, or is it handle natively  
> > > > > > > > > > > > > by the server to save the bandwidth usage ?
> > > > > > > > > > > > > 
> > > > > > > > > > > > > _And second question :_
> > > > > > > > > > > > > 
> > > > > > > > > > > > > When I start licode with initLicode, I get this line in the  
> > > > > > > > > > > > > log :  
> > > > > > > > > > > > > New erizocontroller (1 ) in : 192.168.1.15.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > 192.168.1.15 is the local address of the server, but how can I  
> > > > > > > > > > > > > do to make it use the public address IP (viewed by Internet) to allow users  
> > > > > > > > > > > > > from internet to connect, and not only users from the local network ?
> > > > > > > > > > > > > 
> > > > > > > > > > > > > Thank you very much for your help 🙂
> > > > > > > > > > > > > 
> > > > > > > > > > > > > With these information, I think I can have something ready in  
> > > > > > > > > > > > > 1 or 2 weeks, if some of you are interested, I will show you.
> > > > > > > > > > > > > 
> > > > > > > > > > > > > Guillaume
> > > > > > > > > > > > > 
> > > > > > > > > > > > > –  
> > > > > > > > > > > > > You received this message because you are subscribed to the  
> > > > > > > > > > > > > Google Groups “lynckia” group.  
> > > > > > > > > > > > > To unsubscribe from this group and stop receiving emails from  
> > > > > > > > > > > > > it, send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > > > > > > > > > > > 
> > > > > > > > > > > > > For more options, visit [https://groups.google.com/grou](https://groups.google.com/grou)  
> > > > > > > > > > > > > ps/opt\_out.
> > > > > > > > > > > > 
> > > > > > > > > > > > –  
> > > > > > > > > > > > You received this message because you are subscribed to the  
> > > > > > > > > > > > Google Groups “lynckia” group.  
> > > > > > > > > > > > To unsubscribe from this group and stop receiving emails from  
> > > > > > > > > > > > it, send an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > > > > > > > > > .
> > > > > > > > > > 
> > > > > > > > > > –  
> > > > > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > > > > the Google Groups “lynckia” group.  
> > > > > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > > > > > To unsubscribe from this group and all its topics, send an email  
> > > > > > > > > > to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > > > > 
> > > > > > > > –  
> > > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > > the Google Groups “lynckia” group.  
> > > > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/to](https://groups.google.com/d/to)  
> > > > > > > > pic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > > > 
> > > > > –  
> > > > > You received this message because you are subscribed to a topic in the  
> > > > > Google Groups “lynckia” group.  
> > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > topic/lynckia/Zx0icKQuCX8/unsubscribe.  
> > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > –  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups “lynckia” group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe](https://groups.google.com/d/topic/lynckia/Zx0icKQuCX8/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Javier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/javier/32/20_2.png) [@Javier](https://discourse.lynckia.com/u/Javier)\
**Post date:** [November 5, 2013, 9:13am UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/17 "2013-11-05T09:13:30Z")

</div>

It depends on what you want to offer on your applications. A user can  
publish the video and other users can subscribe to it. Or a user can be  
connected to the room and he don’t have to publish or subscribe anything.  
Or another user can start publish the video in the middle of the conference  
and stop publishing it after a while. You can take a look at the docs in  
[http://lynckia.com/licode/client-api.html](http://lynckia.com/licode/client-api.html)

Cheers,  
Javier.On 4 November 2013 22:48, Guillaume Lepinay [guyost@gmail.com](mailto:guyost@gmail.com) wrote:

> Thank you for the reply.
> 
> I understood for the 2nd question.  
> For the first question, I would like just a little bit more information.  
> If I understood well, every time a client enter the room, he is uploading  
> his stream to the server, and the server will send his viewer. But if there  
> is no viewer for a client, does it send his stream to the server anyway, or  
> is there a native system that can say to the “unview” client : “Don’t  
> publish for the moment, no one subscribe to your stream” and when there is  
> a viewer, it can publish again. (to save the download bandwith of the  
> server if there are many people in a room, but only few of them are viewed).
> 
> I hope you could understand me correctly…
> 
> Thank you very much.  
> Guillaume
> 
> Le lundi 4 novembre 2013 16:51:00 UTC+1, Javier Cerviño a écrit :
> 
> > Hi,
> > 
> > For the first question, Licode solves it for you. You only have to send  
> > every stream once to Licode and Licode will forward it to several users. So  
> > the answer is that it is handle natively by the server.
> > 
> > For the second question, the best solution would be not to use a NAT  
> > device between ErizoController and the Internet, which I guess is your  
> > scenario. But you can also configure Erizo Controller to use a STUN server.  
> > You can check the licode\_config.js and put a configuration like this in the  
> > corresponding lines:
> > 
> > config.erizo.stunserver = ‘stun\_server\_IP’;  
> > config.erizo.stunport = stun\_server\_port;
> > 
> > With your preferred stun server address and ports.
> > 
> > Cheers,  
> > Javier.
> > 
> > On 30 October 2013 20:10, Guillaume Lepinay [guy...@gmail.com](mailto:guy...@gmail.com) wrote:
> > 
> > > Hello every body,
> > > 
> > > I have started working with Licode for 2 weeks now and i’m very happy  
> > > with it.  
> > > Thanks to your previous help I could start very well.
> > > 
> > > Now I have 2 questions.
> > > 
> > > _The most important question :_
> > > 
> > > If 10 users are in a room, and only 3 are viewed by other users, do the  
> > > 10 users send their stream to the server or only the 3 who have at least 1  
> > > subscriber ? Do I have to stop/restart publishing by myself depending to  
> > > the subsribers count for each stream, or is it handle natively by the  
> > > server to save the bandwidth usage ?
> > > 
> > > _And second question :_
> > > 
> > > When I start licode with initLicode, I get this line in the log :  
> > > New erizocontroller (1 ) in : 192.168.1.15.
> > > 
> > > 192.168.1.15 is the local address of the server, but how can I do to  
> > > make it use the public address IP (viewed by Internet) to allow users from  
> > > internet to connect, and not only users from the local network ?
> > > 
> > > Thank you very much for your help 🙂
> > > 
> > > With these information, I think I can have something ready in 1 or 2  
> > > weeks, if some of you are interested, I will show you.
> > > 
> > > Guillaume
> > > 
> > > –  
> > > You received this message because you are subscribed to the Google  
> > > Groups “lynckia” group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [lynckia+u...@googlegroups.com](mailto:lynckia+u...@googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > –  
> > You received this message because you are subscribed to the Google Groups  
> > “lynckia” group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Javier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/javier/32/20_2.png) [@Javier](https://discourse.lynckia.com/u/Javier)\
**Post date:** [November 4, 2013, 3:51pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/18 "2013-11-04T15:51:00Z")

</div>

Hi,

For the first question, Licode solves it for you. You only have to send  
every stream once to Licode and Licode will forward it to several users. So  
the answer is that it is handle natively by the server.

For the second question, the best solution would be not to use a NAT device  
between ErizoController and the Internet, which I guess is your scenario.  
But you can also configure Erizo Controller to use a STUN server. You can  
check the licode\_config.js and put a configuration like this in the  
corresponding lines:

config.erizo.stunserver = ‘stun\_server\_IP’;  
config.erizo.stunport = stun\_server\_port;

With your preferred stun server address and ports.

Cheers,  
Javier.On 30 October 2013 20:10, Guillaume Lepinay [guyost@gmail.com](mailto:guyost@gmail.com) wrote:

> Hello every body,
> 
> I have started working with Licode for 2 weeks now and i’m very happy with  
> it.  
> Thanks to your previous help I could start very well.
> 
> Now I have 2 questions.
> 
> _The most important question :_
> 
> If 10 users are in a room, and only 3 are viewed by other users, do the 10  
> users send their stream to the server or only the 3 who have at least 1  
> subscriber ? Do I have to stop/restart publishing by myself depending to  
> the subsribers count for each stream, or is it handle natively by the  
> server to save the bandwidth usage ?
> 
> _And second question :_
> 
> When I start licode with initLicode, I get this line in the log :  
> New erizocontroller (1 ) in : 192.168.1.15.
> 
> 192.168.1.15 is the local address of the server, but how can I do to make  
> it use the public address IP (viewed by Internet) to allow users from  
> internet to connect, and not only users from the local network ?
> 
> Thank you very much for your help 🙂
> 
> With these information, I think I can have something ready in 1 or 2  
> weeks, if some of you are interested, I will show you.
> 
> Guillaume
> 
> –  
> You received this message because you are subscribed to the Google Groups  
> “lynckia” group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [lynckia+unsubscribe@googlegroups.com](mailto:lynckia+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Wilbert\_Jackson](https://avatars.discourse-cdn.com/v4/letter/w/49beb7/32.png) [@Wilbert\_Jackson](https://discourse.lynckia.com/u/Wilbert_Jackson)\
**Post date:** [November 23, 2013, 12:28pm UTC](https://discourse.lynckia.com/t/question-about-initlicode-erizocontroller-ip-and-question-about-stream-subscribers/253/19 "2013-11-23T12:28:52Z")

</div>

We can’t get the stun server to work either behind a nat. For us changing  
the licode\_config.js to add the stun address and port does not work as the  
licode\_default.js file replaces the licode\_config.js file when nuve script  
runs. Changing the licode\_default.js to add the stun address and port does  
not work as the log never shows any remote client access.On Wednesday, October 30, 2013 2:10:53 PM UTC-5, Guillaume Lepinay wrote:

> Hello every body,
> 
> I have started working with Licode for 2 weeks now and i’m very happy with  
> it.  
> Thanks to your previous help I could start very well.
> 
> Now I have 2 questions.
> 
> _The most important question :_
> 
> If 10 users are in a room, and only 3 are viewed by other users, do the 10  
> users send their stream to the server or only the 3 who have at least 1  
> subscriber ? Do I have to stop/restart publishing by myself depending to  
> the subsribers count for each stream, or is it handle natively by the  
> server to save the bandwidth usage ?
> 
> _And second question :_
> 
> When I start licode with initLicode, I get this line in the log :  
> New erizocontroller (1 ) in : 192.168.1.15.
> 
> 192.168.1.15 is the local address of the server, but how can I do to make  
> it use the public address IP (viewed by Internet) to allow users from  
> internet to connect, and not only users from the local network ?
> 
> Thank you very much for your help 🙂
> 
> With these information, I think I can have something ready in 1 or 2  
> weeks, if some of you are interested, I will show you.
> 
> Guillaume
