Protecting a SA-MP server

This guide configures the SA-MP-specific protocol filter for a running San Andreas Multiplayer server. Confirm the backend address and UDP port on which the server listens before continuing. SA-MP commonly uses UDP port 7777, but you should use your server's configured port.

Configure the backend connection

Choose how X4B will deliver clean traffic to the backend:

  1. Use Reverse Proxy for a simple UDP forwarding setup; or
  2. Create a GRE/IP-in-IP tunnel and choose Encapsulated if the backend must receive the connecting client's source IP.

See the Port types guide for the forwarding differences and the tunnel setup guide if using encapsulation.

Add the SA-MP port

On the service's Ports page, select Add Port and configure:

  1. The public SA-MP port, normally 7777.
  2. SA-MP under Layer 7 (Game) as the protocol.
  3. The selected backend method, backend address or tunnel, and the backend SA-MP port.

The integrated example below uses the default port:


PortsProtocolDomainBackend Actions
>
:
 

The SA-MP preset is UDP-only. Add separate port entries with their actual protocols for any web panel, remote console, voice service, or other listener used alongside the game server. See Layer 7 protection modes for what the SA-MP filter protects.

Test and secure the backend

Wait for deployment to complete, then connect to the filtered IP and public port. Keep host and provider firewalls enabled and allow the SA-MP port only from the current Backend Communication IP Addresses shown in the Dashboard. For a tunnel, also allow the selected tunnel protocol between its endpoints.