| name | networking |
| description | Container networking configuration for RabbitMQ with Podman compose |
| license | MIT |
| compatibility | opencode |
| metadata | {"networking":"container","tool":"podman","domain":"infrastructure"} |
What I Do
Provide networking configuration and troubleshooting guidance for RabbitMQ container deployment in the crypto-scout ecosystem.
Network Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Host System │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ crypto-scout-bridge (Network) │ │
│ │ │ │
│ │ ┌──────────────┐ ┌─────────────────────┐ │ │
│ │ │ crypto-scout │◀───────▶│ crypto-scout- │ │ │
│ │ │ -mq │ 5672 │ client │ │ │
│ │ │ │ 5552 │ │ │ │
│ │ └──────┬───────┘ └─────────────────────┘ │ │
│ │ │ │ │
│ │ │ ┌─────────────────────┐ │ │
│ │ └──▶ crypto-scout- │ │ │
│ │ │ collector │ │ │
│ │ └─────────────────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ External access: 127.0.0.1:15672 ──▶ Management UI │
└─────────────────────────────────────────────────────────────────┘
Port Configuration
Internal Ports (Container Network Only)
| Port | Protocol | Purpose | Exposure |
|---|
| 5672 | AMQP | Queue messaging | Container only |
| 5552 | Streams | Stream messaging | Container only |
| 4369 | EPMD | Erlang discovery | Container only |
| 25672 | Clustering | Inter-node communication | Container only |
External Ports (Host Access)
| Port | Binding | Purpose |
|---|
| 15672 | 127.0.0.1:15672 | Management UI (localhost only) |
Network Configuration
External Network Creation
./script/network.sh
podman network create crypto-scout-bridge
podman network ls
podman network inspect crypto-scout-bridge
Compose Network Declaration
networks:
crypto-scout-bridge:
name: crypto-scout-bridge
external: true
Service Network Attachment
services:
crypto-scout-mq:
networks:
- crypto-scout-bridge
DNS and Discovery
Container Hostnames
services:
crypto-scout-mq:
hostname: crypto_scout_mq
container_name: crypto-scout-mq
Service Discovery
Services connect using container names:
Environment.builder()
.host("crypto-scout-mq")
.port(5552)
.build();
Advertised Host (Streams)
stream.advertised_host = crypto_scout_mq
stream.advertised_port = 5552
Connectivity Testing
From Host
curl http://127.0.0.1:15672
nc -zv localhost 5672
nc -zv localhost 5552
From Other Containers
podman exec crypto-scout-client nc -zv crypto-scout-mq 5672
podman exec crypto-scout-client nc -zv crypto-scout-mq 5552
podman exec crypto-scout-client nslookup crypto-scout-mq
podman exec crypto-scout-client ping -c 3 crypto-scout-mq
Diagnostics
podman inspect crypto-scout-mq | jq '.[0].NetworkSettings.Networks'
podman inspect -f '{{.NetworkSettings.IPAddress}}' crypto-scout-mq
podman exec crypto-scout-mq rabbitmq-diagnostics -q listeners
Troubleshooting
Connection Refused
podman ps | grep crypto-scout-mq
./script/rmq_compose.sh status
podman logs crypto-scout-mq
podman exec crypto-scout-mq netstat -tlnp
DNS Resolution Failure
podman exec crypto-scout-client ping crypto-scout-mq
podman inspect crypto-scout-mq | grep -A 10 "Networks"
./script/rmq_compose.sh down
./script/rmq_compose.sh up -d
Port Conflicts
lsof -i :15672
lsof -i :5672
lsof -i :5552
ports:
- "127.0.0.1:15673:15672"
Network Not Found
./script/network.sh
podman network create crypto-scout-bridge
./script/rmq_compose.sh restart
Advanced Configuration
Custom Subnet
podman network create \
--subnet 10.88.10.0/24 \
--gateway 10.88.10.1 \
crypto-scout-bridge
IPv6 Support
networks:
crypto-scout-bridge:
enable_ipv6: true
ipam:
config:
- subnet: 2001:db8::/64
MTU Configuration
networks:
crypto-scout-bridge:
driver_opts:
mtu: 1400
Security Considerations
Network Isolation
podman port crypto-scout-mq
podman inspect crypto-scout-mq | grep -A 20 PortBindings
Inter-Service Communication
- Services should use container names for DNS resolution
- No hardcoded IP addresses
- Communication encrypted at application level if needed
- All services must be on crypto-scout-bridge network
Performance Tuning
Connection Limits
ulimits:
nofile:
soft: 65536
hard: 65536
Network Mode
network_mode: host
Monitoring
Network Metrics
podman stats crypto-scout-mq
podman exec crypto-scout-mq rabbitmqctl list_connections | wc -l
podman exec crypto-scout-mq ip addr
Bridge Network Inspection
podman network inspect crypto-scout-bridge
podman network inspect crypto-scout-bridge | jq '.[0].containers'
When to Use Me
Use this skill when:
- Setting up container networking
- Troubleshooting connectivity issues
- Configuring service discovery
- Understanding port exposure
- Implementing network security
- Optimizing network performance
- Debugging DNS resolution