Server rental store

How to Secure Your Development Server

# How to Secure Your Development Server

This article provides a comprehensive guide to securing your MediaWiki development server. A secure development environment is crucial for testing changes and preventing accidental exposure of sensitive information. This guide assumes you have a basic understanding of server administration and are running a standard Linux distribution.

1. Initial Server Hardening

Before installing MediaWiki, several basic server hardening steps should be taken. These steps minimize the attack surface and reduce the risk of compromise.

1.1 Update System Packages

Always start by ensuring your operating system and all installed packages are up-to-date. This includes security patches. Use your distribution's package manager.

1.2 Disable Unnecessary Services

Disable any services you do not need. Common services to consider disabling include:

Service Description Recommendation
`telnet` Unencrypted remote access. Disable. Use SSH instead.
`rsh` / `rcmd` Older, insecure remote shell protocols. Disable. Use SSH instead.
`ftp` Insecure file transfer protocol. Disable. Use SFTP or SCP instead.
`tftp` Trivial File Transfer Protocol. Disable unless absolutely required.

1.3 Configure a Firewall

A firewall is essential for controlling network access to your server. `ufw` (Uncomplicated Firewall) is a popular choice for Ubuntu/Debian, while `firewalld` is common on CentOS/RHEL. Configure the firewall to only allow necessary traffic, such as SSH (port 22), HTTP (port 80), and HTTPS (port 443). Consider restricting SSH access to specific IP addresses. See Firewall Configuration for more details.

2. MediaWiki Specific Security Considerations

Once MediaWiki is installed, additional security measures are required.

2.1 Secure `LocalSettings.php`

The `LocalSettings.php` file contains sensitive configuration information, including your database credentials.

⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️