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:
- Use Reverse Proxy for a simple UDP forwarding setup; or
- 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
Open Services, find your service, and choose Action > Ports. Under Single Port, click Add port manually when Add your first port is shown; otherwise click Add Port. Configure:
- The public SA-MP port, normally
7777. - SA-MP under Layer 7 (Game) as the protocol.
- The selected backend method, backend address or tunnel, and the backend SA-MP port.
Click Save and check the saved protocol, backend and port.
The integrated example below uses the default port:
The completed example uses 203.0.113.10 as a documentation-only backend address. Replace it with your backend address, or select the GRE tunnel you created when using encapsulation.
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.
