Consul LAN Gossip
What is Port 8301?
Port 8301 is used by HashiCorp Consul for LAN gossip protocol communication. The gossip protocol (based on SWIM — Scalable Weakly-consistent Infection-style Process Group Membership) handles membership management, failure detection, and event broadcast within a single datacenter. Both Consul servers and clients use port 8301 to gossip with other agents in the same LAN segment. The protocol uses both TCP and UDP — UDP for regular gossip exchanges and TCP for full state synchronization. This efficient protocol allows Consul to scale to thousands of nodes while maintaining low-latency membership awareness.
Common Uses
- Consul node membership management
- Health checking and failure detection
- Event broadcasting within a datacenter
- Service catalog synchronization
Technical Details
Copy-paste commands to check port 8301 (Consul LAN Gossip) from your terminal
Test connectivity
nc -zv example.com 8301
curl -v --max-time 5 http://example.com:8301/
telnet example.com 8301
nmap -p 8301 -sU -sV example.com
(echo > /dev/tcp/example.com/8301) 2>/dev/null && echo "open" || echo "closed"
Open port in firewall
sudo ufw allow 8301/tcp
sudo iptables -A INPUT -p tcp --dport 8301 -j ACCEPT
sudo firewall-cmd --permanent --add-port=8301/tcp && sudo firewall-cmd --reload
Security Considerations
Enable gossip encryption with a shared key to prevent unauthorized agents from joining. Use ACLs to control what agents can register and query. Restrict port 8301 to the Consul cluster network segment.
Popular Ports Reference
The most commonly used and referenced network ports