Firewall Services Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Sections
- Settings Reference
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Are Firewall Services?
Firewall Services is a service definition module that creates reusable protocol/port templates for use in Firewall Rules. Services define the network protocol and port(s) that rules will match against.
Architecture
Key Tables
| Table | Purpose |
|---|---|
public.firewall_services | Service definitions |
Key Files
| File | Description |
|---|---|
modules/firewallServices/ | Frontend module |
2. Module Overview (Commercial/Business)
Business Value
Firewall Services provides reusable port definitions:
| Without Services | With Services | |
|---|---|---|
| Repeat port numbers | Define once, use many | |
| Prone to errors | Consistent definitions | |
| Hard to maintain | Easy updates | |
| No documentation | Named services |
Use Cases
- Standard Services
- Named port definitions
- Telephony Services
- Voice-specific ports
- Custom Applications
- Non-standard services
- Maintenance
- Update all rules
Feature Highlights
| Feature | Benefit | |
|---|---|---|
| Named Services | Human-readable | |
| Port Ranges | Range support (8000-8010) | |
| Multi-Protocol | TCP, UDP, ICMP, All | |
| Reusable | Use in multiple rules | |
| Enable/Disable | Toggle without delete | |
| Description | Documentation |
3. Module Overview (End User/Administrator)
What Can You Do?
- Create service definitions
- Define protocol (TCP, UDP, ICMP, All)
- Set port or port range
- Add descriptions
- Enable/disable services
- Use in Firewall Rules
Firewall Services Interface
Add/Edit Service
Quick Tips
TIP
Port Ranges: Use hyphen for ranges (16384-32768).TIP
Descriptive Names: Use clear names like "SIP-UDP", "RTP-Media".NOTE
Used in Rules: Services are referenced by Firewall Rules.---
4. Configuration Sections
Service Fields
| Field | Description | |
|---|---|---|
| Service Name | Unique identifier | |
| Protocol | Network protocol | |
| Port | Port or range | |
| Description | Optional notes | |
| Enabled | Active/Inactive |
5. Settings Reference
Protocols
| Protocol | Description | Common Use | |
|---|---|---|---|
| TCP | Connection-oriented | HTTP, SSH, SIP-TLS | |
| UDP | Connectionless | SIP, RTP, DNS | |
| TCP/UDP | Both protocols | DNS | |
| ICMP | Internet control | Ping | |
| ICMPv6 | IPv6 control | IPv6 ping | |
| All | Any protocol | Broad rules |
Port Format
| Format | Example | Description | |
|---|---|---|---|
| Single | 80 | One port | |
| Range | 8000-8010 | Port range | |
| Multiple | 80,443 | List (if supported) |
Common PBX Services
| Service | Protocol | Port(s) | Description | |
|---|---|---|---|---|
| HTTP | TCP | 80 | Web (redirect) | |
| HTTPS | TCP | 443 | Secure web + WebRTC WSS proxy | |
| SSH | TCP | 22 | Remote admin | |
| SIP | UDP | 5060 | SIP signaling | |
| SIP-TLS | TCP | 5061 | Secure SIP | |
| RTP | UDP | 16384-32768 | Voice media | |
| STUN | UDP | 3478 | NAT traversal | |
| TURN TLS | TCP | 5349 | NAT traversal (TLS) | |
| Provisioning | TCP | 80, 443 | Phone config |
NOTE
WebRTC Architecture: WebRTC WebSocket (WSS) traffic is proxied through Nginx on port 443 (path /ws). FreeSWITCH plain WebSocket (port 5066) listens only on localhost and is not exposed to the firewall. Port 7443 (direct WSS) has been deprecated.---
6. Common Scenarios & Examples
Scenario 1: Create SIP Service
- Click Add Service
- Name = "SIP"
- Protocol = UDP
- Port = 5060
- Description = "SIP signaling"
- Enabled = ✓
- Save
Scenario 2: Create RTP Range
- Add Service
- Name = "RTP-Media"
- Protocol = UDP
- Port = 16384-32768
- Description = "Voice/Video media"
- Save
Scenario 3: Create Custom API Service
- Add Service
- Name = "Custom-API"
- Protocol = TCP
- Port = 8000-8010
- Description = "Internal API ports"
- Save
Scenario 4: Update Port Range
- Edit existing service
- Change port range
- Save
- All rules using this service update automatically
- Apply Rules in Firewall Rules module
---
7. Limitations & Important Notes
Technical Notes
NOTE
Unique Names: Service names must be unique.NOTE
Used in Rules: Services are referenced by Firewall Rules.WARNING
Disable Carefully: Disabling breaks rules using the service.Best Practices
- Standard Names: Use industry-standard names (HTTP, SSH)
- Clear Descriptions: Document what each service is for
- Group Related: Create separate services for clarity
- Port Ranges: Use ranges for RTP, not individual ports
- Enable Check: Ensure service is enabled before use
Pre-defined vs. Custom
| Pre-defined | Custom | |
|---|---|---|
| HTTP, HTTPS, SSH | Custom-API | |
| SIP, RTP | App-specific | |
| Standard ports | Non-standard |
8. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution | |
|---|---|---|---|
| Service not in dropdown | Disabled | Enable service | |
| Rule not working | Wrong protocol | Check TCP vs UDP | |
| Port not matching | Wrong range | Verify port format | |
| Can't delete | Used in rules | Remove from rules first |
Check Services
Check Service Usage
---
9. Glossary
| Term | Definition | |
|---|---|---|
| Service | Protocol/port template | |
| Protocol | Network communication type | |
| Port | Network endpoint number | |
| Port Range | Consecutive ports | |
| nftables | Linux firewall |
Lua Script Status ℹ️
Security Module
| Component | Status |
|---|---|
| Firewall Services | ℹ️ Service definitions - no Lua handler required |
---
Documentation last updated: January 2026