Geo Firewall configuration for MDaemon, Kerio Connect, IceWarp, and Axigen email servers
This article covers the following email servers:
- MDaemon Email Server by MDaemon Technologies (version 26 and similar)
- Kerio Connect by GFI (version 10.x) on Windows Server
- IceWarp Server (version 14.x) on Windows Server
- Axigen Mail Server by Axigen Messaging (X6 / 10.6) on Windows Server
These four commercial mail suites share one trait that shapes the firewall work. Each ships its own built-in web server for webmail and, separately, a vendor-specific administration port: MDaemon Remote Administration on 1000/444, Kerio Connect WebAdmin on 4040, IceWarp's control ports 32000/32001, and Axigen WebAdmin on 9000/9443 plus a CLI on 7000. The Geo Firewall 2027 configuration pattern is the same for all four. Only the port lists differ, so this article covers them together with a port table per product. The steps use the Geo Firewall 2027 rules model (Default Rule and Port Rules). For the older Geo Firewall v4 model see Geo Firewall v4 exclusion of traffic from blocking.
If you run on-premises Microsoft Exchange Server, see Geo Firewall configuration for Microsoft Exchange Server. For hMailServer, MailEnable, or SmarterMail, see Geo Firewall configuration for hMailServer, MailEnable, and SmarterMail.
Why geo-restrict these servers
A mail suite concentrates many login surfaces on one host: SMTP submission, POP3, IMAP, webmail, chat (XMPP), and, most sensitive of all, the web administration interface. Admin surfaces rarely need to be reachable from more than a handful of territories, yet by default they answer the whole internet. Restricting territories at the packet level removes automated scanning and credential-guessing noise from regions where you have no users, and it takes the administration ports out of worldwide view entirely. It is one layer. Combine it with TLS-only client access, strong authentication, and updates, and expect that an attacker can still relay through an allowed country.
The vendors themselves point the same direction. GFI publishes an allow/deny port table for Kerio Connect that recommends denying the plaintext protocol ports from the internet, and IceWarp's service-port documentation advises opening only the ports for services actually in use. Geo Firewall adds the dimension none of those tables have, which is from where.
Default port surface per product
Documented defaults from each vendor: MDaemon firewall ports, Kerio Connect remote administration ports and the GFI firewall article above, IceWarp's service-ports documentation, and Axigen default ports (KB 169). Every product also connects out to remote port 25 for delivery and uses DNS.
| MDaemon 26 | TCP ports (unless noted) |
| SMTP / submission / SMTPS / ODMR | 25 / 587 / 465 / 366 |
| POP3, POP3S IMAP, IMAPS | 110, 995 143, 993 |
| MDaemon Webmail (built-in, formerly WorldClient) | 3000 (HTTP), 443 (HTTPS) ActiveSync via 80/443 |
| Remote Administration (built-in web server) | 1000 (HTTP), 444 (HTTPS) |
| XMPP BOSH web chat Minger | 5222, 5223 7070, 7443 4069 (UDP) |
| Kerio Connect 10 | TCP ports |
| SMTP / submission / SMTPS | 25 / 587 / 465 |
| POP3, POP3S IMAP, IMAPS (vendor recommends exposing only the secure variants) | 110, 995 143, 993 |
| Webmail (built-in web server with alternate web ports) | 80, 443 (alternates 8800, 8843) |
| WebAdmin administration | 4040 (HTTPS, and plain HTTP on 4040 redirects) |
| NNTP, NNTPS LDAP, LDAPS XMPP | 119, 563 389, 636 5222, 5223 |
| IceWarp 14 | TCP ports (unless noted) |
| SMTP / submission / SMTPS / ODMR | 25 / 587 / 465 / 366 |
| POP3, POP3S IMAP, IMAPS | 110, 995 143, 993 |
| WebClient (built-in web server) | 80, 443 |
| Control / alternate web (remote administration channel) | 32000, 32001 |
| GroupWare API XMPP LDAP, LDAPS | 5229 5222, 5223, 5269 389, 636 |
| VoIP/SIP (only if telephony is used) | 5060, 5061 (+ UDP media range) |
| Axigen X6 | TCP ports |
| SMTP / submission / SMTPS | 25 / 587 / 465 |
| POP3, POP3S IMAP, IMAPS | 110, 995 143, 993 |
| WebMail (built-in web server) | 80, 443 |
| WebAdmin administration | 9000 (HTTP), 9443 (HTTPS) |
| CLI administration | 7000 |
How Geo Firewall 2027 rules apply here
- The Default Rule (Rules tab) sets the whole-server baseline action per territory.
- A Port Rule overrides the Default Rule for its ports, but only for territories explicitly set to Allowed or Blocked in that rule. Territories left Unaffected fall through to the Default Rule. Port 25 stays open worldwide this way while the same countries remain blocked everywhere else.
- The Whitelist (Tools -> Settings... -> Policy -> Whitelist) outranks every rule. Management addresses, monitoring, and relay partners go there.
- Every rule's Actions tree also lists the [Private Networks IPv4] and [Private Networks IPv6] groups (local RFC 1918-style ranges), the [Unknown Networks] group, and any user-defined networks. Set Incoming/Outgoing Action for All applies to the [Unknown Networks] group and the user-defined networks too (it is the icon on the toolbar above the tree, and each click sets all the territories and networks it covers to the next action in the order Unaffected, Blocked, Allowed, so "-> Blocked" in the steps below means that you click it until it shows Blocked). By default it leaves the two Private Networks groups as they are (Settings -> User Interface -> Set Action for All).
Before you begin
- Protect your own access first. Add your management IP to Tools -> Settings... -> Policy -> Whitelist -> IPv4 networks (on cloud VMs, accept the first-start Remote Access Lockout Prevention dialog's offer to whitelist your Remote Desktop address, and recovery steps for Azure are in the RDP lockout article).
- Keep "Automatically whitelist DNS Servers..." enabled (Settings -> Policy -> Whitelist) for MX resolution.
- Update the geographical database (Networks & Geography -> Geo Database -> Pull and Build).
Step 1 — Keep inbound SMTP (port 25) open worldwide
- On the Rules tab, open Port Rules, click New, and title the rule "SMTP inbound mail".
- Filter: Protocol = TCP, Port Endpoint = Local, port 25.
- Actions: Set Incoming Action for All -> Allowed, then Apply.
Remote mail servers worldwide deliver to port 25, so keep it allowed unless organizational policy rejects mail from specific countries, in which case set exactly those territories to Blocked in this rule. If all inbound mail arrives via a filtering relay instead, allow port 25 only from the relay's published ranges, as described in the Exchange article's strict-relay step. The technique is identical for these products.
Step 2 — Set the baseline in the Default Rule
On the Rules tab, select Default Rule and set Incoming to Blocked for territories you have no traffic with, or build the strict allow-list posture with Set Incoming Action for All -> Blocked plus Allowed on your operating countries and on the [Private Networks IPv4] / [Private Networks IPv6] groups (see allow only specific countries). Set the [Unknown Networks] entry deliberately. Click Apply on the Default Rule tab. The Port Rule from Step 1 keeps mail delivery on port 25 open worldwide.
Step 3 — Geo-restrict client ports and webmail
Create a Port Rule "Mail client ports" (TCP, Local) with the submission and mailbox ports from your product's table, typically 465, 587, 993, 995 (plus 110, 143 if plaintext access stays enabled, and 5222 if chat is used). Use Set Incoming Action for All -> Blocked, then set the territories where your users are and the [Private Networks IPv4] / [Private Networks IPv6] groups to Allowed. Create a second rule "Webmail" for local TCP 443 and 80 (Kerio alternates 8800/8843, MDaemon webmail 3000) with the same actions. Keep the allowed list broad enough for traveling users, or route travelers through a VPN into an allowed country.
Step 4 — Lock the administration ports down hard
This is the step specific to this product group. Create a Port Rule titled "Mail admin interfaces" (TCP, Local) containing your product's administration ports:
- MDaemon: 1000, 444 (Remote Administration)
- Kerio Connect: 4040 (WebAdmin)
- IceWarp: 32000, 32001 (control/alternate web)
- Axigen: 9000, 9443 (WebAdmin) and 7000 (CLI)
Use Set Incoming Action for All -> Blocked, then set Allowed only on the territory (or single country) your administrators work from, plus the [Private Networks IPv4] / [Private Networks IPv6] groups for administration from the local network. For even tighter control, leave all territories Blocked here and rely on the Whitelist entries from "Before you begin". Whitelisted management addresses stay reachable through any Block, so the admin ports end up reachable from your own addresses only.
Step 5 — Optionally enforce TLS-only client access network-wide
GFI's Kerio Connect guidance recommends denying the plaintext ports (110 POP3, 143 IMAP, 119 NNTP, 389 LDAP, and plain-HTTP admin) from the internet in favor of their TLS variants. Geo Firewall can enforce that for any of these products at the packet level. Put the plaintext ports in their own Port Rule and use Set Incoming Action for All -> Blocked. If internal clients on the local network still need the plaintext ports, set the [Private Networks IPv4] / [Private Networks IPv6] groups to Allowed in this rule. The result is that no internet host in any territory can reach the plaintext listeners, while the LAN still can.
Step 6 — Keep outbound delivery working
If the Default Rule blocks Outgoing to territories you send mail to, add a Port Rule with Port Endpoint = Remote, port 25, and Set Outgoing Action for All -> Allowed (or keep Outgoing unaffected in the Default Rule). Replies return automatically on the tracked connection. Smart-host setups instead whitelist the relay and keep outbound geography strict.
Step 7 — Verify and monitor
- Tools -> IP Geo Lookup checks which territory an address falls in.
- The Log tab shows allowed and blocked traffic per territory, with the triggering rule on the Ultimate edition. Statistics break traffic down per territory and IP, and on the Ultimate edition also per process, where a rule can be created from a process (Create Rule).
- Enable the file log, or ETW streaming on Ultimate for SIEM collection. See SIEM & ETW traffic logging.
- Finish with Tools -> Read Only Policy Mode, and export the policy (File -> Export Policy..., a .vgf file) to back up or replicate the configuration across servers.
Last updated: November 20, 2026.
Shopping Cart