2017-10-12 3 views
1

Google Cloud UbuntuのインスタンスでCoturnを実行しようとしています。新鮮なVMでubuntuのコータン設定

は、使用してcoturnをインストール:coturn

を須藤はaptインストール私は、秘密鍵と証明書ファイルを作成し、/etc/turnserver.confを更新:

listening-port=3478 
tls-listening-port=5349 
listening-ip=10.128.0.2 
relay-ip=10.128.0.2 
external-ip=35.192.224.52/10.128.0.2 
lt-cred-mech 
userdb=/var/lib/turn/turndb 
user=attitudemarketing:password 
cert=cert.crt 
pkey=private.key 
no-stdout-log 

すべてがあると思われます私はトリクルアイスをしようとすると、実行しているものの:https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/それは

を動作していないようです、これはcoturnからログファイルです:

0: log file opened: /var/log/turn_1978_2017-10-12.log 
0: pid file created: /var/run/turnserver.pid 
0: IO method (main listener thread): epoll (with changelist) 
0: Wait for relay ports initialization... 
0: relay 10.128.0.2 initialization... 
0: relay 10.128.0.2 initialization done 
0: relay ::1 initialization... 
0: relay ::1 initialization done 
0: Relay ports initialization done 
0: IO method (general relay thread): epoll (with changelist) 
0: turn server id=1 created 
0: IPv4. TCP listener opened on : 127.0.0.1:3478 
0: IPv4. TCP listener opened on : 127.0.0.1:3479 
0: IPv4. TCP listener opened on : 10.128.0.2:3478 
0: IPv4. TCP listener opened on : 10.128.0.2:3479 
0: IPv6. TCP listener opened on : ::1:3478 
0: IPv6. TCP listener opened on : ::1:3479 
0: IO method (general relay thread): epoll (with changelist) 
0: turn server id=0 created 
0: IPv4. TCP listener opened on : 127.0.0.1:3478 
0: IPv4. TCP listener opened on : 127.0.0.1:3479 
0: IPv4. TCP listener opened on : 10.128.0.2:3478 
0: IPv4. TCP listener opened on : 10.128.0.2:3479 
0: IPv6. TCP listener opened on : ::1:3478 
0: IPv6. TCP listener opened on : ::1:3479 
0: IPv4. UDP listener opened on: 127.0.0.1:3478 
0: IPv4. UDP listener opened on: 127.0.0.1:3479 
0: IPv4. UDP listener opened on: 10.128.0.2:3478 
0: IPv4. UDP listener opened on: 10.128.0.2:3479 
0: IPv6. UDP listener opened on: ::1:3478 
0: IPv6. UDP listener opened on: ::1:3479 
0: Total General servers: 2 
0: IO method (auth thread): epoll (with changelist) 
0: IO method (admin thread): epoll (with changelist) 
0: IPv4. CLI listener opened on : 127.0.0.1:5766 
0: IO method (auth thread): epoll (with changelist) 
0: SQLite DB connection success: /var/lib/turn/turndb 

GoogleクラウドVMの内部にあるため、動作しているのかブロックされているのかわかりません。

+0

私はファイアウォールのポートを開く必要があると思います。ポート3478と5349を開くようにしてください(下記の手順を参照)。(https://stackoverflow.com/questions/21065922/how-to-open-a-specific-port-such-as-9090-in-google-compute-エンジン)。 – Kyle

答えて

2

最近、AWS Ubuntu EC2インスタンスでcoturnサーバーを設定しました。プロセスはGoogle Cloudインスタンスで同じにする必要があります。

まず、次の着信ポートが(TCP & UDP)を開いていることを確認してください。

  • 3478と3479(標準リスニング・ポートおよび代替ポートをリスニング)
  • 5349と5350(標準TLS-リスニング・ポートと代替TLSリスニングポート)
  • 49152から65535(標準リレーポート)テストのため

、あなたのサーバが到達可能になるまで、IDの広告D turnserver.confに次の:一般的に

no-tls 
no-dtls 
verbose 

、また、あなたの設定にfingerprintを追加する必要があります。

これらの説明については、thisを確認してください。私はまた今のところあなたの設定からcert=cert.crtpkey=private.keyを削除したいと思います。

この時点で、リモートコンピュータからサーバーにアクセスできるはずです。これをテストする最良の方法は、通常、あなたのリモートマシンのブラウザに行き、 "your-public-ip":3478に行きます。

サーバが到達可能であるならば、あなたはブラウザに次のように表示されるはずです。

pic

ない場合は、次のことを試してください。

  • はリスニング-IPを削除し、リレー-IPを、external-ipとlisten-portをturnserver.confから取得して、自分自身で決定します(これはAWS EC2の私にとってはうまくいきます)。

  • リスニングポートを80に、altリスニングポートを443に設定し、サーバー上のポートを開きます。これは非常に厳しいファイアウォールに対しては役立ちますが、私はこれがGoogle VMの問題ではないと思います。

関連する問題