Skip to content
RU

Port 3478: STUN/TURN server (WebRTC)

Laptop with a webcam on top showing a blurred video call grid, headset lying beside it
Key idea:

Port 3478 (UDP) is the standard for STUN/TURN server (WebRTC). STUN (Session Traversal Utilities for NAT) and TURN — NAT-traversal protocols for WebRTC. Port 3478 — UDP and TCP. WebRTC clients use it to discover external IP + traverse fire

Below: what uses this port, security considerations, online check, FAQ.

Check your host & ports →

What is on this port

STUN/TURN server (WebRTC)

STUN (Session Traversal Utilities for NAT) and TURN — NAT-traversal protocols for WebRTC. Port 3478 — UDP and TCP. WebRTC clients use it to discover external IP + traverse firewalls. Popular servers: coturn (open source), Twilio STUN/TURN (SaaS).

Security considerations

TURN server without auth = relay for arbitrary traffic. Requires TURN secret. STUN is safe (just returns external IP).

Check this port online

Check port online →

Enterno.io Ping + Port checker tests TCP reachability of any port from our server in Moscow.

How to Configure a STUN/TURN Server on Port 3478

Setting up a STUN/TURN server on port 3478 can significantly enhance the connectivity of WebRTC applications. Below are the steps to configure a basic STUN/TURN server using coturn, a popular TURN server software.

1. Install coturn: Depending on your operating system, you can install coturn using the following commands:

  • For Ubuntu: sudo apt-get install coturn
  • For CentOS: sudo yum install coturn

2. Edit Configuration File: The configuration file is usually located at /etc/turnserver.conf. Open it using your preferred text editor:

  • sudo nano /etc/turnserver.conf

3. Basic Configuration: Ensure the following lines are uncommented and configured:

  • listening-port=3478
  • fingerprint
  • lt-cred-mech
  • realm=yourdomain.com

4. Enable UDP: To ensure that your server is listening for UDP traffic, include:

  • no-loopback-peers
  • no-multicast-peers

5. Start the Server: After saving your configuration, you can start the TURN server with:

  • sudo turnserver -c /etc/turnserver.conf

6. Testing the Configuration: You can test if the server is running correctly by using a tool like telnet:

  • telnet yourdomain.com 3478

With these steps, you should have a functioning STUN/TURN server on port 3478, ready to facilitate WebRTC connections.

Security Considerations for Port 3478 (UDP)

When using port 3478 for STUN/TURN services, security is paramount to protect against unauthorized access and potential attacks. Here are key security considerations:

  • Firewall Rules: Ensure that your firewall allows traffic on port 3478 for both UDP and TCP. However, restrict access to known IP addresses whenever possible to minimize exposure.
  • Authentication: Implement authentication mechanisms for TURN server connections. Use the lt-cred-mech (long-term credential mechanism) to ensure that only authenticated users can access the TURN service.
  • Encryption: Utilize DTLS (Datagram Transport Layer Security) or TLS (Transport Layer Security) to encrypt the data exchanged between clients and the TURN server. This will protect against eavesdropping and man-in-the-middle attacks.
  • Regular Updates: Keep your TURN server software and operating system up to date. Regular updates can close known vulnerabilities that could be exploited by attackers.
  • Monitoring: Implement logging and monitoring on your TURN server to detect unusual patterns or unauthorized access attempts. Tools like fail2ban can help mitigate brute force attacks.

By taking these security measures, you can significantly reduce the risks associated with using port 3478 for STUN/TURN services in your WebRTC applications.

Common Use Cases for Port 3478 in WebRTC Applications

Port 3478 is primarily used for NAT traversal in WebRTC applications. Here are some common use cases:

  • Video Conferencing: Applications like Zoom and Google Meet utilize STUN/TURN servers to establish peer-to-peer connections between participants, allowing for seamless video and audio communication.
  • Real-Time Collaboration Tools: Tools such as Miro or Figma rely on WebRTC to enable real-time editing and collaboration, using port 3478 to traverse NATs and firewalls.
  • Online Gaming: Multiplayer online games often use WebRTC for real-time communication between players. Port 3478 helps establish direct connections, reducing latency.
  • IoT Devices: Internet of Things (IoT) applications can leverage STUN/TURN servers for remote control and monitoring of devices behind NATs, using port 3478 for connectivity.
  • Customer Support Solutions: Live chat and video support systems, such as those used by customer service platforms, employ WebRTC to connect customers and agents, utilizing port 3478 for NAT traversal.

These use cases highlight the importance of port 3478 in enabling real-time communication and collaboration across various platforms, making it a vital component of modern web applications.

Learn more

Sources

Frequently Asked Questions

Is port 3478 open by default?

No, modern cloud providers (AWS, Google Cloud, Yandex) close all incoming ports by default. You must explicitly allow port 3478 in a Security Group or firewall.

How to check if my port 3478 is reachable?

Use Enterno Ping + Port Checker. Or in shell: nc -vz example.com 3478 or telnet example.com 3478.

Is port 3478 safe to expose?

Depends on the service. STUN/TURN server (WebRTC) should never be exposed publicly without authentication + TLS. See our 2026 exposure research.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.