ipv6 setting

hyuk

New Member
I am changing the settings to make the flashphoner work in the ipv6 environment, but there is a problem with the operation.

I refer to the document below.

For reference, let's assume that our ipv6 address is 1:2:3:4:5:6::8/120 .
120 is the subnet prefix length.

First of all, we install and use coturn server and flashphoner on one server.
For reference, it will be used only in a closed network, so listening-ip and external-ip are the same.

1. coturn turnserver.conf
listening-ip=1:2:3:4:5:6::8/120
external-ip=1:2:3:4:5:6::8/120
2. flashphoner.properties
ip=1:2:3:4:5:6::8/120 (?)
ip_local=1:2:3:4:5:6::8/120 (?)
ip_v6=1:2:3:4:5:6::8
ice_add_ipv6_candidate=true
3. wcs-core.properies
-Djava.net.preferIPv4Stack=false
4. web client turn info
turn:[1:2:3:4:5:6::8]:3478?transport=udp

Do you have any problems with your settings?
If something is wrong, please guide me on how to set it up.

When I input 1:2:3:4:5:6::8/120 to ip_v6 in flashphoner.properties, an error stating org.jboss.netty.channel.ChannelException: invalid IPv6 address was thrown in the flashphoner's client log.
Entering 1:2:3:4:5:6::8 in ip_v6 in flashphoner.properties org.jboss.netty.channel.ChannelException: Faild to bind to: /1:2:3:4:5:6 ::8:31001 An error occurred.
 

Max

Administrator
Staff member
Good day.
ip=1:2:3:4:5:6::8/120 (?)
ip_local=1:2:3:4:5:6::8/120 (?)
ip and ip_local should always be IPv4 addresses
turn:[1:2:3:4:5:6::8]:3478?transport=udp
You should also set WCS internal TURN server to listen other port if you are using port 3478 to connect to coturn on the same host
Code:
turn_port=3479
Or bind coturn to port 443 for example.
Also, you should use transport=tcp.
When I input 1:2:3:4:5:6::8/120 to ip_v6 in flashphoner.properties, an error stating org.jboss.netty.channel.ChannelException: invalid IPv6 address was thrown in the flashphoner's client log.
ip_v6 parameter does not support netmasks.
We made a test, WebRTC over IPv6 correctly works with the following settings (this is the example, set your instance IPs):
In flashphoner.properties:
Code:
ip                     =172.27.44.216
ip_local               =172.27.44.216
...
ip_v6=fe80::215:5dff:fed4:6167
ice_add_ipv6_candidate=true
...
In wcs-core.properties:
Code:
...
-Djava.net.preferIPv4Stack=false
...
All the other settings were left as default.
Also, when using coturn, you can also force relay policy from client side
Code:
Flashphoner.createSession({
    urlServer: url,
    mediaOptions: {
        "iceServers": [ {
           'url': 'turn:ip_address:3478?transport=tcp',
           'credential': 'password1',
           'username': 'username1' } ],
        "iceTransportPolicy": "relay"
    }
})
In this case, all the media traffic will go through coturn, and coturn should be configured to connect to WCS via local IPv4 interface. See the example of coturn set up on the same host here.
 

hyuk

New Member
Thank you for quick response.
As I wrote in the question above, I tried using it except netmask.
The port failed to bind normally.
In ipv4 it worked fine.
I just changed it to ipv6 and I ran into a problem.
The createSession option is set the same except that we used udp.
What value should be entered for ip or ip_local in falshphoner.properties in a closed network environment without an ipv4 address?
Reading the article, it looks like we wrote it normally, except for ip and ip_local.
Are there any other strange things?
 

Max

Administrator
Staff member
What value should be entered for ip or ip_local in falshphoner.properties in a closed network environment without an ipv4 address?
WCS requires ip and ip_local to be IPv4 addresses, IPv6 is only additional address.
In our test above, we used private IPv4 network 172.16.0.0/12 (like Docker for example). So you should use such network.
We raised the ticket WCS-3350 to implement local IPv6 setting to bind ports if this possible.
 

hyuk

New Member
The problem of binding not working when ip and ip_local are set differently from ip_v6 has been resolved.

Checked normal operation when not using coturn or flashphoner's internal turnserver.
However, there is a problem with operation when using a turn server together.
How to set up to use flashphoner's internal turn?
Do you have any problems with the settings below?
ip=127.0.0.1
ip_local=127.0.0.1
ip_v6=1:2:3:4:5:6::8
ice_add_ipv6_candidate=true
turn:[1:2:3:4:5:6::8]:3478?transport=udp
"iceTransportPolicy": "relay"
turn_ip=1:2:3:4:5:6::8
turn_ip_local=1:2:3:4:5:6::8
turn_password=xxx
turn_media_port_from=36001
turn_media_port_to=37000
turn_media_ports_auditor_interval=5000
turn_media_ports_auditor_max_attempts=3
turn.server_channel_receive_buffer_size=1048576
turn.server_channel_send_buffer_size=1048576
turn_port=3478

And it seems like an error related to coturn server, so I don't know if I can get an answer if I write it here, but when using coturn, an error of CreatePermission Error Response error-code:443(Peer Address Family Mismatch) occurs.
The coturn settings are as follows.
listening-port=3478
listening-ip=1:2:3:4:5:6::8
external-ip=1:2:3:4:5:6::8
When using coturn, the port of the internal turnserver of flashphoner was changed to 3479.
 

Max

Administrator
Staff member
turn:[1:2:3:4:5:6::8]:3478?transport=udp
Internal TURN server does not work via UDP, use TCP only.
And it seems like an error related to coturn server, so I don't know if I can get an answer if I write it here, but when using coturn, an error of CreatePermission Error Response error-code:443(Peer Address Family Mismatch) occurs.
Plese read this doc.
 
Top