X-Road Security Server ports and firewall rules

A Security Server needs specific inbound and outbound paths for message exchange, OCSP, the admin UI, information systems and trust services. This page maps each one so you can write firewall rules before installation.

On this page

Which X-Road Security Server ports to open and why

A network team writing firewall rules for X-Road needs to sort the Security Server's connections into three groups: traffic that comes from other members' Security Servers, traffic that comes from the internal network, and traffic that the server itself initiates toward the Central Server and trust services. The documented listening ports are TCP 5500 for message exchange and TCP 5577 for OCSP, both reachable from external networks, because other members' Security Servers send service requests to port 5500 and query certificate status on 5577. On the internal side, the admin UI listens on TCP 4000, and information systems call published services through TCP 8080 or 8443. The Security Server acts as the member's gateway: internal systems never talk to other members directly, and external members never reach the information system itself. That split is what lets you expose only the gateway port to the outside.

Plan the rules before installation, because the same list drives the change review and later audits of exposed services. Place the Security Server between the internal network and the external network so that only the external-facing ports are reachable from outside, and restrict the admin UI on 4000 to a management subnet. Confirm with the official installation guide whether 8080 or 8443 applies to your deployment, since the choice affects which internal clients need access. Outbound connections to the Central Server, the trust services and the other members' Security Servers are not fully covered in the summary above. Ask the operator for the exact destinations, ports and any monitoring or time synchronization traffic in your configuration, and check them against the X-Road Security Server installation guide before the rules are approved.

How traffic flows across the Security Server firewall

Traffic from other members arrives on the external side of the firewall and reaches the Security Server on TCP 5500 for message exchange and TCP 5577 for OCSP. The Security Server then hands requests to the internal information system, which is reached on 8080 or 8443, while administrators use the admin UI on TCP 4000 from the internal network. The PostgreSQL database sits entirely inside the internal zone, so it should never be reachable from outside. Check each inbound rule against the port list in the installation guide before you open anything.

Inbound ports from external and internal networks, with the database path kept internal.

Port groups and the traffic each one carries

This table lists each connection group a Security Server handles, with its direction, the firewall side it faces, who starts the connection and the decision it drives. Read it as a checklist: confirm each row against your network design before you open any rule, because the Security Server's own ports are only one part of the picture.

Connection groupDirection and firewall sideWho initiates itDecision it drives
Message exchange (TCP 5500)Inbound from external networks, facing the internet or the inter-member networkOther members' Security ServersAllow from the member network ranges you have agreed to exchange with, and no wider
OCSP responses (TCP 5577)Inbound from external networksOther members' Security Servers checking certificate statusKeep open alongside 5500 so peers can validate your certificates; confirm with your trust service provider which OCSP endpoints apply
Admin UI (TCP 4000)Inbound from internal networks only, facing your administration networkSecurity Server administratorsRestrict to administrator workstations or a jump host; never expose it on the external interface
Information system access (TCP 8080 or 8443)Inbound from internal networks, facing your service consumers and providersYour information systems calling X-RoadChoose 8443 when the link needs TLS; choose 8080 only where traffic stays on a segment you control. Confirm the setting in your version's guide
PostgreSQL (database port)Internal only, between the Security Server and its database hostThe Security Server, which opens the connectionRestrict to the Security Server address; if the database is remote or managed, confirm the port and the network path with your database team
Central Server and trust servicesOutbound from the Security Server to the governing authority and approved trust servicesThe Security ServerAllow outbound only to the endpoints your governing authority publishes, and confirm them before go-live rather than opening broad outbound access

Where the Security Server sits relative to the firewall

The Security Server has two sides: an external side that other members reach on TCP 5500 and 5577, and an internal side where your information systems and administrators connect on TCP 4000, 8080 or 8443. Placement decides which of those listeners are reachable from where, so each card below is a decision your network team should settle before the server is registered.

Single DMZ-style placement

Place the Security Server in a demilitarized zone with a single inbound rule set: TCP 5500 and 5577 open from external networks, and nothing else exposed to the internet. Other members must reach the server for message exchange and OCSP checks, so these two ports are the only inbound paths the design should allow. Confirm with your network team that the DMZ can reach the database and your information systems through explicit rules, and that outbound traffic to the Central Server and trust services is permitted.

Installation guide

Separated internal network for admin access

Keep the admin UI on TCP 4000 reachable only from management hosts on a restricted administrative network, not from the general internal LAN. Information system consumers reach the server on 8080 or 8443, so those rules should be scoped to the specific systems that publish or consume services. Confirm which hosts your administrators use and whether jump hosts or a bastion are part of your access model.

Database on an internal segment

The Security Server requires PostgreSQL, whether local or remote, so the database connection is an internal flow that should never cross the external boundary. Decide whether the database stays on the same host, moves to an internal database segment, or uses a managed service such as AWS RDS or Azure Database for PostgreSQL. Each option changes which firewall rules exist, so confirm the database port, the allowed source addresses and how the managed service is reached from your network.

Load balancers and redundant servers

A load balancer in front of several Security Servers changes where the external ports terminate and which addresses members see. Decide whether the balancer forwards TCP 5500 and 5577 transparently, how health checks reach each server, and whether admin traffic bypasses the balancer entirely. Each server must still be individually reachable for administration, and the database and any shared state must be reachable from every node. Confirm the design with the high availability topic before you write rules.

Outbound paths to the governing authority

The Security Server must reach the Central Server and the trust services for configuration, certificate status and time stamping, so outbound rules are part of the placement decision. Decide which egress path the DMZ uses, whether a proxy is allowed, and how DNS resolves the Central Server and trust service hostnames. Confirm the exact destination ports and hostnames with the governing authority, because they are set by that authority's deployment rather than by the Security Server alone.

Writing and testing the firewall rules

This sequence turns the port plan into enforced firewall rules that are tested from the correct source networks before the Security Server carries live traffic. The result is a server where each required path is open, every other path is closed, and a registered member can complete a test exchange.

  1. Collect the network plan and peer addresses

    The network or security team gathers the Security Server's addresses, the internal subnets that will reach the admin UI and information systems, and the address ranges of the other members, the Central Server and the trust services (certificate authorities, OCSP and timestamping). The database host and its port are added to the list. The team also confirms which external networks will reach the server on 5500 and 5577, and whether those ranges are fixed. The step is done when every source and destination has a named owner and an address or range written down, and someone has confirmed the addresses with the operators of the Central Server and trust services.

  2. Write inbound rules for external exchange

    Create inbound rules that allow TCP 5500 for message exchange and TCP 5577 for OCSP from the member and trust service ranges collected in the previous step, and nowhere else. Rules should name source ranges rather than open the ports to all addresses. Apply the same restriction to any cloud security group or load balancer in front of the server. The step is done when a rule review shows that both ports are reachable only from the planned external sources, and the rule set is saved in version control or the change record.

  3. Write inbound rules for internal access

    Create inbound rules that allow TCP 4000 for the admin UI from the administrator workstations or jump hosts, and TCP 8080 or 8443 for information system access from the internal networks where your services consume or publish X-Road services. Confirm which of 8080 or 8443 your configuration uses before writing the rule, since the installation guide lists both options. The admin UI should not be reachable from the general internal network. The step is done when the rule list shows each internal port tied to a named source group, and the admin UI port is excluded from any broad internal range.

  4. Write outbound rules for core services

    Create outbound rules from the Security Server to the Central Server, the configuration anchor and global configuration distribution points, the trust services, and the PostgreSQL host, using the ports and protocols those services publish in your environment. Include DNS and time synchronization if your policy requires explicit rules for them. Confirm each outbound port with the operator of the destination service, since this guide does not list every outbound path. The step is done when every outbound rule has a destination owner, and the default egress policy is set to deny for anything not on the list.

  5. Apply the rules in a test environment

    Apply the complete rule set to a test Security Server, preferably one with the same operating system, network path and firewall product as production. Use a test or standalone environment only for rule checks, since it does not reproduce a registered member's trust relationships. Record the exact rule set applied and any service that stopped working when the default deny was active, then correct the rules and reapply. The step is done when the test server starts, its services are running, and the change record contains the final rule set with its version.

  6. Verify each port from the correct source

    Run a connection test for every rule from the source it was written for, and from one source outside the allowed range to confirm the block. Check TCP 5500 and 5577 from an external member network, and TCP 4000 and 8080 or 8443 from the internal source groups. Test outbound connections from the Security Server to the Central Server, trust services and database. A test from the wrong source should fail, and a test from the right source should succeed. The step is done when a written test log shows a pass or expected failure for every rule, with the date and source host for each result.

  7. Confirm a test message exchange

    Once the port tests pass, complete an end-to-end check with a registered member, using a test service that both sides have agreed to expose. Confirm that the request leaves the Security Server, that the counterparty's Security Server accepts it on 5500, and that the response returns. Check that OCSP responses are being retrieved through 5577. Keep the message log entry as evidence of the test. The step is done when the test exchange succeeds, the OCSP check completes, and the team signs off the rule set for production.

Common mistakes that break message exchange or expose the admin UI

The most damaging mistake is exposing TCP 4000, the Security Server admin UI, to the internet or to any network that is not the administrators' own. The admin UI is meant for internal networks only, so a rule that opens it for convenience, such as a temporary allow-all during a registration push that never gets reverted, turns the server's configuration surface into a public target. Check this with a connection test from outside your internal network: an open response on 4000 from an external host is a finding that needs an immediate rule change. Review firewall logs for accepted connections to 4000 from addresses outside your administrative range, and confirm that the same is true for information system ports 8080 and 8443, which should accept traffic only from the internal systems that consume or publish services.

The second group of failures blocks traffic the server needs to function. Outbound access to the Central Server and to the OCSP responders used for certificate checks is easy to overlook because it does not look like business traffic. When it is blocked, registration requests stall, certificate status cannot be confirmed, and message exchange fails in ways that look like peer problems. Symptoms usually appear in the Security Server logs as connection or timeout errors to the trust service or Central Server, and an outbound test from the server host to each endpoint in your governing authority's documentation will show the gap quickly. Confirm the exact endpoints with your X-Road operator, since this page does not list them, and test them from the same network segment the Security Server uses, not from a workstation.

A third mistake appears after a team moves PostgreSQL off the host. The Security Server still needs its serverconf, messagelog and opmonitor databases, and a firewall rule or connection string that still points to the old local path, or that allows only the local socket, leaves the server running with broken database access. Check that the database host, port and credentials in the server configuration match the new location, and that the firewall on the database side allows connections only from the Security Server addresses. The fourth mistake is allowing information system ports from untrusted networks, which lets any host reach services that were meant only for your own systems. Test each rule by connecting from a host that should be blocked, and treat any success as a rule to tighten.

Hardening the exposed ports

Opening a port is only half the job. The controls below come from the X-Road security hardening guide (version 0.6, 09.01.2025) and cover who can reach the admin side, how the server answers requests, how admin logins are protected and how the host itself is accessed. Align each rule with your own security policy before you apply it.

Restrict admin UI access

The admin UI on TCP 4000 should be reachable only from dedicated management hosts, never from the general internal network or the internet. Build the firewall rule from a short list of named administrator addresses, then test it from a host that is not on that list. Confirm that information system traffic on 8080 or 8443 is governed by separate rules, so that a client system cannot reach administrative functions by accident.

Hardening guide

Set the allowed hostnames

The allowed-hostnames setting limits which host names the server accepts in incoming requests, which blocks host header injection. Without it, a request that spoofs the host header can be processed under a name the operator never intended. List the exact names used by your admin UI and service endpoints, and check that a request with an unlisted host name is refused after each change.

Hardening guide

Lock out failed admin logins

Admin users authenticate through PAM, so the lockout and password rules are applied at the operating system level. The hardening guide recommends locking an account for 15 minutes after 3 failed logins and requiring passwords of at least 16 characters. Confirm these rules with your identity team, especially if LDAP groups feed the X-Road roles through SSSD, because a lockout policy that differs between local and directory accounts creates gaps.

Require key-only SSH

Remote shell access to the Security Server host is a path around every application control. The hardening guide recommends key-only SSH, which disables password logins for the host. Restrict the SSH source addresses to the management hosts, and confirm that the keys used for administration are tied to named individuals so that access can be removed when a role changes.

Publish global configuration over HTTPS

From version 7.4, the global configuration can be published over HTTPS instead of plain HTTP. Check which X-Road version each server runs before you plan this change, since the option applies only from 7.4 onward. Test that dependent members can still fetch the configuration after the switch, and confirm the certificate chain they trust before you close the port used for the old endpoint.

Questions teams ask before opening X-Road ports

Can the X-Road admin UI be exposed to the internet?

No. The admin UI on TCP 4000 should be reachable only from a restricted internal management network, never from the internet. The Security Server's admin interface controls members, keys, certificates and configuration, so a compromise there affects every service it publishes. Limit access to named administrator workstations or a jump host, enforce strong authentication, and keep the information system ports on TCP 8080 or 8443 on the internal side as well. The X-Road security hardening guidelines cover further restrictions, including the allowed-hostnames setting. Confirm the exact rules with your security team before the change request is raised.

Do the X-Road ports have to be open to every member?

Not necessarily. Message exchange on TCP 5500 and OCSP on TCP 5577 face external networks, but the exact set of peers that can reach them depends on how your organization exchanges data and on the rules set by your governing authority. Confirm with the X-Road operator whether it requires specific source addresses, whether it operates a central OCSP responder path, and which members you actually need to call or serve. Then restrict inbound rules to those peers where your firewall and the operator's policy allow it, and document each rule with its business reason so it can be reviewed later.

How long does the firewall work take, and who needs to be involved?

The duration depends mostly on your change control process, not on the number of ports. Four groups usually take part: the network team that owns firewalls and routing, the security team that approves exposure and reviews rules, the X-Road operator or governing authority that confirms which peers and trust services must be reachable, and the platform team that runs the Security Server and checks connectivity after each change. Ask your change board how long it needs for a standard or emergency request, and plan the registration window around the approval date rather than the installation date. Any figure you are quoted should come from your own change calendar.

Can our team open and test the X-Road ports without outside help?

Yes, many teams do. The work consists of defining the required flows, writing firewall rules for each direction, applying them in staging, and proving that each flow works and that unwanted traffic is blocked. The X-Road Security Server installation guide lists the ports used on each side. A practical test plan should check message exchange and OCSP from an external network, admin UI reachability only from the approved management network, information system access from the internal network, and outbound access to the Central Server and trust services. Record the results so the change can be audited later.

Where should the Security Server sit relative to the firewall?

The Security Server typically sits between the internal network that hosts your information systems and the external network where other members connect. It needs to be reachable on the external side for message exchange and OCSP, and reachable from the internal side for the information systems it publishes and for the admin UI on a management network. Your architecture should keep the admin UI and database connections off the external segment. Confirm the placement with your network and security teams and with the X-Road operator, because the answer changes if you run clustered servers behind a load balancer or a remote PostgreSQL service.

What does a partner need from us to plan the firewall rules?

A partner needs the material that lets it write rules you can approve. The usual inputs are current network diagrams showing zones, firewalls and the path from the Security Server to information systems, an address plan covering the Security Server, its database, the information systems and the management network, a list of the members and trust services it must reach, and the existing change approval process with its lead times. The partner should also know which team signs off on external exposure. Ask for a written scope listing what the firewall review covers, what it tests, and which deliverables you receive.

Do the Security Server ports change with the X-Road version?

Check this against the documentation for the version you deploy, because version differences matter. The current release is 7.8.3, and the supported versions are 7.8.3, 7.7.4 and 7.6.5 according to the X-Road releases page. The port figures in this section come from the Security Server installation guide for the 7.x line. If you plan to move to X-Road 8, which is in beta, treat the port and firewall design as a separate exercise and confirm its requirements against the 8.0.0 Beta 2 documentation before you rely on them.

Limits to confirm in your environment

The port list on this page is a starting point, not a complete firewall design. Each card below names a place where your own network, cloud account, operating system or release can change which connections actually happen, and each item must be confirmed against the official guides or the current release before you submit change requests.

Outbound destinations from your authority

The Security Server must reach the Central Server, the configuration anchor sources and the certification and OCSP services that your governing authority and trust service providers designate. These endpoints are set by the governing authority and the approved CAs, not by DeployOpen or by this page, so do not copy outbound rules from another member's server. Ask the authority for the exact hosts, ports and protocols, and confirm them against the Security Server installation guide before opening egress.

Installation guide

Source addresses behind load balancers and NAT

Other members see the address that reaches port 5500 after any translation, so a NAT gateway, reverse proxy or load balancer can change the source they allow or the address that appears in logs. Confirm with your network team whether traffic from other members arrives with their original address or a translated one, and whether the address that other members must allow is the one your server actually presents. Test this with a registered peer before you assume the rules work.

Cloud security groups and host firewalls

In a cloud account, a security group may allow a port that the host firewall still blocks, or the reverse, and both layers must permit the same flows. Write down which layer owns each rule, who can change it, and whether the admin UI on port 4000 is reachable only from the internal network. Check that changes to either layer are logged, because a silent drift between them is a common cause of failed exchanges.

SELinux and firewall differences on RHEL and Ubuntu

RHEL 8 and 9 enforce SELinux by default and usually use firewalld, while Ubuntu Server 22.04 and 24.04 LTS commonly use ufw or nftables with AppArmor. A rule that works on one platform can be incomplete on the other, and SELinux labels can block a listener even when the port is open. Confirm the default policy on your build, test each listening port after installation, and record the commands used so the same state can be rebuilt.

Ports added by monitoring and the 8.0 beta

The Security Server accepts the ports listed in the installation guide, but monitoring add-ons, which raise the memory baseline to 4 GB, and any additional services introduced in the X-Road 8 beta may open or use further listeners. Check the listening sockets after installing each add-on, and confirm the ports for the current release (7.8.3 is the current release) before planning rules for 8.0.0 Beta 2, which is for testing only.

How DeployOpen fits network rules into the installation

DeployOpen plans the port matrix as part of the installation scope, not as an afterthought once the server is running. Before work starts, the port matrix is written out for each Security Server: which external members may reach TCP 5500 for message exchange and TCP 5577 for OCSP, which internal networks may reach TCP 4000 for the admin UI and TCP 8080 or 8443 for information system access, and which outbound paths are needed to the Central Server, the configuration anchor sources and the trust services. The matrix is agreed in writing with the client, and the scope states who signs off on each row.

DeployOpen then prepares the rules for the client's firewall or cloud security controls, using the matrix as the single source. The client's network team keeps ownership of its firewalls, security groups and change process, so DeployOpen supplies the rule definitions and the reasoning behind them, and the client applies them through its own change control. Ask the team to confirm how the server sits relative to the firewall, including whether any load balancer or NAT in front of it changes the source addresses the Security Server sees.

Once the rules are in place, DeployOpen runs connection tests from each network segment that should be allowed and from those that should be blocked, then runs a message exchange test between two members to confirm the path works end to end. The results, including failed or deliberately blocked attempts, are recorded as evidence for the client's security team. Retests after any firewall change are part of the agreed deliverables, so the record stays current with the running configuration.

How DeployOpen scopes and supports X-Road Security Server networking

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, and X-Road Security Server ports and firewall rules are handled the same way. We start from the connections your Security Server must make, agree the work in writing, and hand over rules and evidence your security and network teams can review.

How we scope

  • Inventory every inbound and outbound flow: message exchange, OCSP, admin UI, information system access, Central Server and trust services.
  • Confirm which network zones, firewalls and load balancers sit between the Security Server and each partner or internal system.
  • Agree the scope, deliverables and timeline in writing before work starts, since most engagements are fixed-scope.

How we build

  • Write the firewall rule set as a reviewable table covering source, destination, protocol, port and purpose for each flow.
  • Apply rules in your environment and verify each one with connectivity tests from the correct network segment.
  • Check that the admin UI and management interfaces are reachable only from approved administrator networks, and that unused ports stay closed.

How we hand over

  • Deliver the final port matrix, network diagram and rule configuration so your network and compliance teams can review them.
  • Document how each rule was tested, what it depends on, and what to re-check after a Security Server upgrade or network change.
  • Walk your operations team through troubleshooting steps for blocked message exchange, OCSP failures and trust service access.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer when your rules need regular review.
  • Retest network exposure after changes to firewalls, load balancers, DNS or the Security Server version.
  • Keep the port matrix current so audits and incident responders work from the actual configuration.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.