Security & Hardening

AV Services · avservices.in · Mumbai, India


A Secure Server Is One You Never Have to Think About

Security is not a feature you add to a Linux server. It is a discipline you apply to it — continuously, methodically, and with full awareness that the threat landscape it operates in is not static.

The server you launched six months ago with reasonable security decisions is not as secure today as it was then. Not because anything went wrong. Because the world it is connected to has changed. New vulnerabilities have been published for the kernel it is running. New attack tools have been released that target services it is exposing. New credential databases from unrelated breaches have been fed into automated scanners that are probing its SSH port right now, at this moment, as you read this.

Security is not a state. It is a posture. And a posture requires ongoing attention to maintain.

This page explains what security hardening means in practice, what it covers, what it prevents, and why the businesses most at risk are often the ones who believe their server is reasonably secure because nothing has gone wrong yet.


What Your Server Looks Like From the Outside

Before explaining what AV Services does, it is worth being precise about what your server faces.

Your server has a public IP address. That IP address was indexed by automated internet scanners within hours of it going online. Those scanners run continuously, probing every reachable IP address on the internet for open ports, identifiable services, and known vulnerabilities. They are not operated by sophisticated state actors or elite criminal organisations. They are operated by opportunists running automated tools that require no skill to deploy and no human attention to maintain.

When a scanner finds your server, it identifies the services running on each open port. It checks the version strings against a database of known vulnerabilities. It tries default credentials against every management interface it can identify. It feeds your IP address into brute-force tools that try password combinations from breach databases at thousands of attempts per hour.

None of this is targeted at your business specifically. You have not been singled out. Every public server receives this treatment. The question is not whether your server is being probed. It is whether it is configured to withstand the probing that is happening continuously and automatically whether you are aware of it or not.


SSH Hardening

SSH is the primary administrative access point for a Linux server. It is also the most consistently attacked service on the public internet. The default SSH configuration on most Linux distributions is functional but not hardened — it permits root login, it permits password authentication, and it listens on the well-known port 22 that every scanner probes first.

SSH hardening addresses each of these defaults systematically.

Root login is disabled. Direct SSH access as root means a successful brute-force attack immediately yields the highest level of system access. Disabling root login requires attackers to know both a valid username and the corresponding credentials — two unknowns instead of one, with the username being the part that most automated tools assume rather than discover.

Password authentication is disabled in favour of key-based authentication. SSH keys are cryptographically strong by default in a way that passwords rarely are in practice. A properly generated SSH key pair cannot be brute-forced in any realistic timeframe with current computing resources. Password authentication, regardless of password strength, is vulnerable to credential stuffing attacks using breach databases containing billions of real password combinations.

Unnecessary SSH features are disabled — agent forwarding where not required, X11 forwarding, TCP forwarding where not needed. Each enabled feature that is not actively used is an attack surface that is not justified by any operational requirement.

Login attempt limits are configured at the SSH daemon level, complementing the network-level brute-force protection provided by fail2ban. Idle session timeouts are set. The SSH banner is configured to provide no information about the server that would assist an attacker in targeting their approach.


Firewall Configuration

A firewall that nobody has reviewed since the server was built is not a security control. It is a historical record of access decisions that may or may not reflect the current state of the server or the current requirements of the business.

Firewall management under an AV Services retainer covers the full lifecycle of firewall rules — not only the initial configuration but the ongoing review that keeps the ruleset accurate and minimal.

Every rule in the firewall is documented — what service it permits, why that service needs to be accessible, from what source addresses if restriction is possible. Rules that no longer correspond to active services are removed. Rules that are overly broad — permitting access from any source when access should be restricted to specific IP ranges — are tightened. The net effect of the complete ruleset is verified to match the intended access policy.

The principle is least privilege applied to network access. Every port that is open without a clear, current justification is a liability. The firewall should permit what the business requires and deny everything else — not as a theoretical statement of policy but as a verified operational reality confirmed by regular review.


Intrusion Prevention With fail2ban

fail2ban monitors log files for patterns that indicate malicious activity — repeated failed login attempts, suspicious access patterns, probing behaviour — and automatically blocks the source IP addresses at the firewall level for a configurable duration.

The default fail2ban configuration is a starting point, not a solution. The default settings — five failed attempts triggering a ten-minute ban — are trivially circumvented by modern brute-force tools that throttle their attempt rate to stay below the threshold. Effective fail2ban configuration requires tuning the findtime, maxretry, and bantime parameters to reflect the actual threat patterns visible in the server’s logs, not the defaults chosen for broad compatibility.

AV Services configures fail2ban with parameters calibrated to each server’s specific environment and attack patterns. SSH brute-force attempts are detected and blocked at rates that make sustained automated attacks impractical. Repeat offenders — IP addresses that are banned, wait out the ban period, and resume — are escalated to longer ban durations automatically.

fail2ban itself requires ongoing management. The service can crash silently. The log files it monitors can grow to sizes that cause it to consume excessive memory and CPU — a failure mode that AV Services has encountered and resolved in production environments. Log rotation, service health monitoring, and periodic review of the ban list and the underlying log patterns are part of routine retainer maintenance.


User Account and Access Management

Every user account on a production Linux server is an attack surface. Every account with more access than its function requires is an unnecessary risk. Every account belonging to someone who no longer needs access is a liability that offers no corresponding benefit.

User account management covers the full account lifecycle — creation with minimum necessary privileges, periodic review of existing accounts and their access levels, and timely revocation when access is no longer required.

The most consistently neglected aspect of access management is the last part. Creating accounts is a visible action prompted by an immediate operational need. Revoking accounts when that need ends requires a process and a reminder that most organisations do not have. Former employees, former contractors, developers who had temporary access for a specific task — these accounts accumulate on servers without anyone intending them to remain.

In the audit findings documented elsewhere on this site, accounts belonging to individuals who had left client organisations months or years earlier were present on seven out of ten servers audited. In one case, a former employee who had departed 14 months earlier still had full sudo access and an active SSH key on a production server handling live customer data.

Access reviews are conducted quarterly as part of the retainer. Every account, every SSH key, every sudo privilege is verified against current operational requirements. Access that cannot be justified by a current requirement is revoked. The principle is that production server access should be a managed asset — granted deliberately, documented, and removed when no longer needed — not an accumulation of historical decisions that nobody has revisited.


Patch Management and CVE Response

The Linux kernel and the packages running on your server accumulate known vulnerabilities over time. These vulnerabilities are publicly documented in the CVE database, complete with severity scores, technical descriptions, and in many cases proof-of-concept exploit code. An unpatched server is a server running known vulnerabilities against a threat landscape that knows about them.

Monthly patch cycles are the core of ongoing security maintenance. OS packages are updated to current stable releases. Kernel updates are applied and the server is rebooted in a planned maintenance window. The patch cycle is documented — what was updated, what version was current before the update, what version is current after. The client knows their server is patched because the patch cycle is logged, not because nothing bad has happened yet.

For critical vulnerabilities — those with CVSS scores above 8.0 or with active exploitation observed in the wild — AV Services responds outside the monthly cycle. A critical kernel vulnerability with a public exploit does not wait for the next scheduled maintenance window. It is addressed as soon as a stable patch is available and the client has been informed of the requirement.


Security Monitoring and Log Analysis

A server that is not monitored is a server where incidents develop undetected. Security monitoring is the practice of watching what is happening on the server — not reactively after a visible failure, but continuously, looking for the patterns that precede failures and the indicators that suggest compromise.

Log analysis as part of routine maintenance looks for anomalies in authentication logs, access logs, system logs, and application logs. Unusual login times. Access from unexpected geographic locations. Processes running under unexpected user accounts. Network connections to unexpected destinations. File modifications in directories that should not be changing. These are the early indicators of compromise that are visible in the logs long before they manifest as visible failures — if someone is looking at the logs.

The auth.log on a typical production server contains tens of thousands of failed login attempts per month. Most of them are automated noise from internet scanners. A small number of them are targeted. The difference between noise and signal requires someone who knows what the server’s normal activity looks like and can identify deviations from it. That baseline is only possible with ongoing, consistent monitoring by someone who has been watching the server over time.


What a Hardened Server Actually Looks Like

After a full security hardening engagement, the server presents a minimal, deliberate attack surface.

Root SSH login is disabled. Password authentication is disabled. Only necessary ports are open. Every open port corresponds to a documented, active service with a current operational justification. fail2ban is running, tuned, and monitored. All packages and the kernel are current within the last maintenance cycle. User accounts are documented and correspond to current personnel with current access requirements. No management interfaces are accessible from the public internet without IP restriction or VPN. Backup destinations are configured to be unreachable from the server in a way that would allow a compromised server to destroy them. Log monitoring is active with anomaly detection configured.

This is not an aspirational state. It is a verified state, documented in the post-hardening report and maintained by the monthly retainer cycle that keeps it current as the environment and the threat landscape evolve.

A server in this state is not impenetrable. No server is impenetrable. But it is a server that presents no easy targets, that does not carry known exploitable vulnerabilities, that actively detects and blocks automated attacks, and that generates the log data needed to identify and respond to sophisticated attempts before they escalate.

That is what security hardening is actually for. Not to achieve perfect security — a standard that does not exist. To ensure that attacking your server requires genuine effort and specific knowledge, rather than running a freely available automated tool against a target that has never been hardened.


Starting With an Audit

Security hardening begins with an accurate picture of the current state. Before anything can be hardened, the current configuration needs to be understood — what is exposed, what is running, what is patched, what is not, what access exists and whether it should.

The free Infrastructure Audit that AV Services offers as a first step produces precisely this picture. A read-only assessment of your current server environment, delivered as a written report within five business days, covering every material security finding with a severity rating and a specific remediation recommendation.

From that baseline, hardening is a systematic process with a clear endpoint and a documented result. Not a vague improvement in security posture, but a specific list of findings that have been addressed, with the server’s new configuration documented and the ongoing maintenance schedule in place to keep it current.


Contact

Email: arun@avservices.in

Website: avservices.in

Book a free Infrastructure Audit: arun@avservices.in


AV Services · avservices.in · Mumbai, India Linux Infrastructure Care & Maintenance Since 1999 SSH Hardening · Firewall Management · fail2ban · Patch Management · Access Control · Security Monitoring