Glossary

Gateway Server

A gateway server is the controlled entry and exit point between two networks or two systems that speak different protocols. Traffic passes through it, and it decides how.

What is a gateway server?

A gateway is any machine that stands at a boundary and translates or controls what crosses it. The boundary can be between networks, such as a private guest network inside a server and the public internet. It can be between protocols, such as legacy industrial devices that speak Modbus and a cloud dashboard that expects MQTT. Or it can be between many internal services and the outside world, as with an API gateway. In every case, clients on one side talk to the gateway, and the gateway talks to the other side on their behalf.

How is a gateway different from a router or a proxy?

A router forwards packets between networks by address, mostly without looking inside. A proxy forwards requests for specific applications. A gateway is the broader idea: it may route, it may proxy, but it is defined by sitting at a boundary and often by translation. In everyday networking, the "default gateway" in your routing table is simply the router your machine sends all non-local traffic to. On our machines that is the other address of the IPv4 on a /31 pair, which the provider side holds.

What kinds of gateway servers are common?

TypeJoinsTypical software
NAT gatewayPrivate guest networks and the internetLinux with nftables or iptables MASQUERADE
VPN gatewayRemote users or sites and private servicesWireGuard, OpenVPN, strongSwan
API gatewayOutside clients and internal servicesKong, Tyk, nginx, Envoy
Protocol or IoT gatewayDevices and back-end systems in different protocolsNode-RED, Mosquitto bridges, custom services
Email gatewayThe internet and an internal mail systemPostfix with Rspamd
Payment gatewayA shop and payment networksA service the shop calls over HTTPS

How does a NAT gateway work on one machine?

When you run virtual machines on a Proxmox host or containers on a bridge, those guests use private addresses. The host acts as their gateway: guests send traffic to the host, which rewrites the source to its public IPv4 address and forwards it. Replies come back to the host, which maps them to the right guest. Incoming services are published with port forwards. The full setup with rules is on iptables port forwarding. Because each of our machines has one public IPv4 address, this is the standard way to give many guests internet access from one box.

What does an API gateway add?

A single front door for many services. It checks API keys or tokens, applies rate limits per client, routes each path to the right internal service, rewrites requests and responses, and collects metrics in one place. That keeps each service simple: it trusts the gateway and focuses on its own job. Small setups often use nginx for this; larger ones use a dedicated gateway with a plugin system. The services behind it are described on API server.

What does a gateway server need in hardware?

Usually network capacity more than raw compute. NAT and routing are cheap per packet in the Linux kernel. VPN gateways spend CPU on encryption, which modern CPUs handle with dedicated instructions; WireGuard reaches several gigabits per second per core on recent hardware. API gateways spend CPU on TLS and on plugins. A realistic guide:

  • Small office VPN or NAT for a handful of guests: E1 or E2.
  • Busy API gateway or VPN for many users: S2 or S4 with a 2x 10 Gbps port.
  • High-throughput gateway with heavy TLS: S13 with 2x 25 Gbps.

What should I watch when running one?

A gateway is a single point that everything crosses, so it is both a security control and a single point of failure. Keep its own exposed surface minimal, with only the gateway services listening publicly. Log decisions such as denied requests and rate-limit hits. Monitor connection counts and throughput, and plan what happens if it goes down: a standby gateway in a second city with DNS failover is the usual budget answer, covered on High availability. Remember that everything the gateway sends out counts toward its outgoing traffic allowance.

Related terms: Proxy server, VPN server and Client-server model.

Machines Suited to Gateway Roles

ServerProcessorCores / threadsMemoryStorageNetworkPer monthSmallest order
E1Intel Xeon E3-1240 v34 / 816 GB DDR32x 240 GB SSD2x 1 Gbps$30.52$91.56 (3 months)
E2Intel Xeon E3-1270 v34 / 832 GB DDR31x 480 GB SSD2x 1 Gbps$38.32$114.96 (3 months)
S2Intel Xeon E-2356G6 / 1264 GB DDR41x 1 TB NVMe2x 10 Gbps$58.39$58.39 (1 month)
S4Intel Xeon E-2388G8 / 1664 GB DDR41x 1 TB NVMe2x 10 Gbps$87.52$87.52 (1 month)
S13AMD EPYC 4345P8 / 16128 GB DDR52x 2 TB NVMe2x 25 Gbps$237.92$237.92 (1 month)

Keep Reading

Proxy server

A server that sits between clients and destinations and forwards their traffic, in forward or reverse form, for control, caching or privacy.

Open

VPN server

A server that accepts encrypted tunnels from devices or sites and joins them to a network, with WireGuard and OpenVPN compared.

Open

iptables port forwarding

Forward a public port to a VM, container or remote host with DNAT, enable routing, and keep replies flowing back the right way.

Open

VPN gateways

Run WireGuard or OpenVPN for a team or a fleet of offices on a box whose CPU and port belong to you alone.

Open

FAQ

Quick Answers

A router is one kind of gateway between IP networks. Gateway is the broader term and often includes protocol translation or access control.

The router your machine sends all non-local traffic to. On a /31 link it is the other address in the pair.

Yes. The host uses NAT so guests with private addresses share its public IPv4, and port forwards publish services.

No. It sits in front of the services that do the work, handling authentication, rate limits and routing.

Run a standby gateway, ideally in another city, and switch over with DNS or a floating configuration.