Remote Access to Event Socket

Status
Not open for further replies.

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
In answer to a question from @cogs66:

Create an acl for you remote IPs, I named mine esl_acl:

eventsocket.png

Modify your event_socket.conf.xml:
Code:
<configuration name="event_socket.conf" description="Socket Client">
  <settings>
    <param name="nat-map" value="false"/>
    <param name="listen-ip" value="0.0.0.0"/>
    <param name="listen-port" value="8021"/>
    <param name="password" value="ClueCon"/>
    <param name="apply-inbound-acl" value="esl_acl"/>
  </settings>
</configuration>

If you change your password you will need to supply the new password when using fs_cli, you should be OK to secure it with IP tables. If you are not confident with that, you should probably not be messing with remote access to the event socket in the first place.

Grant access to the event socket by allowing destination port 8021 from your remote IP.

Reload the ACl and restart freeswitch.

Test the connection from remote with telnet:

When connected type auth followed by your password and press enter twice:
Code:
telnet 192.168.50.144 8021
Trying 192.168.50.144...
Connected to 192.168.50.144.
Escape character is '^]'.
Content-Type: auth/request

auth ClueCon

Content-Type: command/reply
Reply-Text: +OK accepted

Job done! :D
 

cogs66

New Member
Nov 11, 2020
3
0
1
57
@DigitalDaz Thank you so much for this.

It does work indeed. The place I was going wrong was by not adding the ACL. It seems this is mandatory which is fair enough. I have secured with IP tables.

Once again thank you, I appreciate this.
 
Status
Not open for further replies.