amazon-web-servicesubuntuamazon-ec2webrtccoturn

TURN server installation on AWS EC2 free-tier instance


I enabled all necessary ports for coturn server on my instance from security group. I also configure the turnserver.conf file correctly, but still when I added my turn server on trickleICE, it shows error 701.

Here is my turnserver.conf:


listening-port=3478

# and 5349 for TLS (secure)
tls-listening-port=5349
#alt-listening-port=80

# Require authentication
fingerprint
lt-cred-mech


# Specify the server name and the realm that will be used
# if is your first time configuring, just use the domain as name
server-name=mydomain.com
realm=mydomain.com

# Important:
# Create a test user if you want
# You can remove this user after testing
user=<myusername>:<mypassword>

#min-port=705
#max-port=1000

total-quota=100
stale-nonce=600

external-ip=<my public ip>/<my private ip>
listening-ip=<my private ip>
relay-ip=<my public ip>




Screenshot of ec2 inbound security group: security-groups

Screenshot of: TRICLE ICE RESPONSE

Can someone help me with this? When I entered the command

sudo systemctl status coturn

The status is active screenshot of coturn status


Solution

  • There may be two parts from your config file that needs to be modified.

    1. set the relay-ip to your private ip address.
    external-ip=<my public ip>/<my private ip>
    listening-ip=<my private ip>
    relay-ip=<my private ip>
    
    1. In your ec2's security group settings, you have set the inbound rules for IPv6 addresses. You should add 0.0.0.0/0 (for IPv4) to the CIDR blocks field in the inbound rules.