Ctrl K
ring2all.com

Access Control Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Sections
  5. Settings Reference
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

---

1. Module Overview (Technical)

What Is Access Control?

Access Control is an IP filtering module that manages whitelist and blacklist entries for network access. It integrates with nftables firewall and Fail2Ban for automatic ban synchronization and rule application.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Access Control Architecture                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Access Control Lists                                           │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │                                                          │   │
│  │  Whitelist                    Blacklist                  │   │
│  │  ┌────────────────┐           ┌────────────────┐         │   │
│  │  │ Office Network │           │ SIP Scanner    │         │   │
│  │  │ 192.168.1.0/24 │           │ 45.134.x.x     │         │   │
│  │  │ Priority: 10   │           │ Priority: 100  │         │   │
│  │  │ Source: Manual │           │ Source: Fail2Ban│        │   │
│  │  ├────────────────┤           ├────────────────┤         │   │
│  │  │ Admin VPN      │           │ Brute Force    │         │   │
│  │  │ 10.0.0.0/8     │           │ 185.x.x.x      │         │   │
│  │  │ Priority: 20   │           │ Source: Manual │         │   │
│  │  └────────────────┘           └────────────────┘         │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Sync & Apply                                           │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │                                                          │   │
│  │  [Sync Fail2Ban]     [Apply Rules]     [Unban IP]       │   │
│  │       │                   │                │             │   │
│  │       ▼                   ▼                ▼             │   │
│  │  Import auto-bans    Apply to nftables  Remove ban      │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Applied to system                                      │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Linux Firewall                                    │   │
│  │                                                          │   │
│  │  nftables:                                              │   │
│  │  ├─ Whitelist → Accept rules                            │   │
│  │  └─ Blacklist → Drop rules                              │   │
│  │                                                          │   │
│  │  Fail2Ban:                                              │   │
│  │  └─ Active jails with banned IPs                        │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.access_controlWhitelist/blacklist entries

Key Files

FileDescription
modules/accessControl/Frontend module
/etc/nftables.confApplied rules
---

2. Module Overview (Commercial/Business)

Business Value

Access Control provides granular IP filtering:

Without Access ControlWith Access Control
No IP filteringWhitelist/blacklist
Manual firewall editsWeb interface
No Fail2Ban visibilitySync banned IPs
Complex nftablesSimple management

Use Cases

  1. Office Access
- Whitelist office IPs

- Allow VPN ranges

  1. Block Attackers
- Manual blacklist

- Import Fail2Ban bans

  1. SIP Protection
- Block SIP scanners

- Allow trunk IPs

  1. Regional Blocking
- Block country ranges

- Allow specific networks

Feature Highlights

FeatureBenefit
WhitelistGuaranteed access
BlacklistBlock bad actors
Fail2Ban SyncImport auto-bans
PriorityOrdered evaluation
Protocol FilterSpecific protocols
UnbanQuick unblock
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Add whitelist entries
  • Add blacklist entries
  • Sync Fail2Ban banned IPs
  • Unban specific IPs
  • Apply rules to firewall
  • Set priority order
  • Filter by protocol/port

Access Control Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Access Control                                     │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Manage IP address whitelist and blacklist                     │
│                                                                 │
│  [+ Add Entry]  [Apply Rules]  [Sync Fail2Ban]                 │
│                                                                 │
│  [Whitelist] [Blacklist]                                        │
│                                                                 │
│  [🔍 Search by name, IP address, or description...]            │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Name          │ List    │ IP Address   │ Protocol│ Source│  │
│  ├───────────────┼─────────┼──────────────┼─────────┼───────┤  │
│  │ Office LAN    │Whitelist│192.168.1.0/24│ All     │Manual │  │
│  │ Admin VPN     │Whitelist│10.0.0.0/8    │ All     │Manual │  │
│  │ SIP Scanner 1 │Blacklist│45.134.88.12  │ UDP     │Fail2Ban│ │
│  │ Brute Force   │Blacklist│185.220.101.5 │ All     │Manual │  │
│  │ SIP Scanner 2 │Blacklist│193.32.162.8  │ UDP     │Fail2Ban│ │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
│  Source: Manual = Added by admin, Fail2Ban = Auto-detected     │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Add/Edit Entry

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Add Access Control Entry                           │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Name: [Office Network                   ]                     │
│    A descriptive name for this access control entry            │
│                                                                 │
│  Description: [Main office IP range      ]                     │
│    Optional description for this entry                          │
│                                                                 │
│  List Type: [Whitelist ▼]                                      │
│    Whitelist allows traffic, Blacklist blocks traffic          │
│                                                                 │
│  IP Address: [192.168.1.0/24             ]                     │
│    IP address or CIDR network                                   │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  Protocol: [All ▼]                                             │
│    All | TCP | UDP | ICMP                                       │
│                                                                 │
│  Direction: [Input (Incoming) ▼]                               │
│    Input | Output | Forward                                     │
│                                                                 │
│  Priority: [10            ]                                    │
│    Lower numbers = higher priority, executed first              │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  Source Port: [                          ]                     │
│    Optional source port or range                                │
│                                                                 │
│  Destination Port: [                     ]                     │
│    Optional destination port or range                           │
│                                                                 │
│  Interface: [eth0                        ]                     │
│    Optional network interface name                              │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  Enabled: ✓                                                    │
│                                                                 │
│  [Save] [Cancel]                                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Whitelist First: Add trusted IPs before blocking ranges.
TIP
Sync Fail2Ban: Import auto-detected attackers.
WARNING
Apply Rules: Changes don't take effect until applied!

---

4. Configuration Sections

Entry Fields

FieldDescription
NameEntry identifier
DescriptionOptional notes
List TypeWhitelist or Blacklist
IP AddressIP or CIDR range
ProtocolAll, TCP, UDP, ICMP
DirectionInput, Output, Forward
PriorityOrder (lower = first)
Source PortOptional port/range
Destination PortOptional port/range
InterfaceOptional interface
EnabledActive/Inactive

Entry Sources

SourceDescription
ManualAdded by administrator
Fail2BanSynced from Fail2Ban
NFTablesSynced from nftables
---

5. Settings Reference

List Types

TypeActionUse Case
WhitelistAllow trafficTrusted IPs
BlacklistBlock trafficBad actors

Common Protocols

ProtocolDescription
AllAll protocols
TCPWeb, SSH, SIP-TCP
UDPSIP, RTP, DNS
ICMPPing

Priority Guidelines

PriorityUse
1-50Critical whitelist (admin access)
51-100Standard whitelist (office, VPN)
101-200Standard blacklist
201-500Broad blocks (countries, ranges)

Common CIDR Ranges

CIDRIPsExample Use
/321 IPSingle attacker
/24256 IPsOffice network
/1665,536 IPsLarge network
/816M IPsVPN range
---

6. Common Scenarios & Examples

Scenario 1: Whitelist Office Network

  1. Click Add Entry
  2. Name = "Office Network"
  3. List Type = Whitelist
  4. IP = 192.168.1.0/24
  5. Protocol = All
  6. Direction = Input
  7. Priority = 10
  8. Enable = ✓
  9. Save
  10. Apply Rules

Scenario 2: Block Attacker IP

  1. Add Entry
  2. Name = "SIP Scanner"
  3. List Type = Blacklist
  4. IP = 45.134.88.12
  5. Protocol = UDP
  6. Destination Port = 5060
  7. Priority = 100
  8. Save
  9. Apply Rules

Scenario 3: Sync Fail2Ban Bans

  1. Click "Sync Fail2Ban"
  2. Wait for sync
  3. Review new blacklist entries
  4. Source will show "Fail2Ban"
  5. Apply Rules if needed

Scenario 4: Unban False Positive

  1. Find banned IP in list
  2. Click Unban button
  3. Confirm unban
  4. IP is removed from blacklist
  5. Apply Rules

---

7. Limitations & Important Notes

Technical Notes

NOTE
Apply Required: Changes need "Apply Rules" to take effect.
NOTE
Priority: Lower numbers are processed first.
WARNING
Don't Block Yourself: Always whitelist admin IPs first!

Best Practices

  1. Whitelist Admin: Always whitelist your IP first
  2. Specific First: Specific IPs before broad ranges
  3. Use CIDR: Block ranges, not individual IPs
  4. Sync Regularly: Keep Fail2Ban entries updated
  5. Review Bans: Check for false positives

Whitelist vs. Firewall Rules

Access ControlFirewall Rules
IP-based onlyService-based
Simple allow/blockComplex rules
Quick entryFull configuration
Fail2Ban syncManual only
---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
IP still blockedApply not clickedApply Rules
Can't accessBlacklistedCheck entries
False positiveFail2Ban strictUnban IP
Not blockingEntry disabledEnable entry

Check Entries

Sql
SELECT 
  name,
  list_type,
  ip_address,
  protocol,
  priority,
  source,
  is_enabled
FROM public.access_control
ORDER BY list_type, priority;

Fail2Ban Commands

Bash
# Check banned IPs
fail2ban-client status sshd

# Unban specific IP
fail2ban-client set sshd unbanip 192.168.1.100

# View all jails
fail2ban-client status

nftables Commands

Bash
# List current rules
nft list ruleset

# Check specific chain
nft list chain inet filter input

---

9. Glossary

TermDefinition
WhitelistAllowed IP list
BlacklistBlocked IP list
CIDRIP range notation
Fail2BanIntrusion detection
nftablesLinux firewall
PriorityRule order
---

Lua Script Status ℹ️

Security Module

ComponentStatus
Access Controlℹ️ IP filtering - no Lua handler required
Access Control is a security configuration module. It manages IP whitelist/blacklist entries. No Lua handlers are used - rules are applied to nftables by the backend service.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?