Docs / Windows Server / Windows Firewall Advanced Configuration

Windows Firewall Advanced Configuration

By Admin · Mar 23, 2026 · Updated Apr 23, 2026 · 7 views · 3 min read

This guide covers how to set up and configure firewall on a Linux VPS. Whether you're running a production environment or a development setup, these instructions will help you get started quickly and securely.

Prerequisites

  • A registered domain name (for public-facing services)
  • Root or sudo access to the server
  • Administrator access to the server

Installation Steps

It's recommended to test this configuration in a staging environment before deploying to production. This helps identify potential compatibility issues and allows you to benchmark performance differences.


# Windows Server initial configuration
Rename-Computer -NewName "MYSERVER" -Restart
Set-TimeZone -Id "Eastern Standard Time"

# Enable Windows Firewall rules
New-NetFirewallRule -DisplayName "Allow HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow
New-NetFirewallRule -DisplayName "Allow HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow

Make sure to restart the service after applying these changes. Some settings require a full restart rather than a reload to take effect.

Important Notes

Regular maintenance is essential for keeping your firewall installation running smoothly. Schedule periodic reviews of log files, disk usage, and security updates to prevent issues before they occur.

Initial Configuration

It's recommended to test this configuration in a staging environment before deploying to production. This helps identify potential compatibility issues and allows you to benchmark performance differences.


# Install Windows features
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
Install-WindowsFeature -Name firewall -IncludeAllSubFeature

# Check installed features
Get-WindowsFeature | Where-Object Installed

Each line in the configuration serves a specific purpose. The comments explain the reasoning behind each setting, making it easier to customize for your specific use case.

  • Use connection pooling for database connections
  • Profile before optimizing - measure first
  • Scale vertically before scaling horizontally

Service Management

The default configuration works well for development environments, but production servers require additional tuning. Pay particular attention to connection limits, timeout values, and logging settings.


# Windows Server initial configuration
Rename-Computer -NewName "MYSERVER" -Restart
Set-TimeZone -Id "Eastern Standard Time"

# Enable Windows Firewall rules
New-NetFirewallRule -DisplayName "Allow HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow
New-NetFirewallRule -DisplayName "Allow HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow

These commands should be run as root or with sudo privileges. If you're using a non-root user, prefix each command with sudo.

  • Test your backup restore procedure monthly
  • Review log files weekly for anomalies
  • Keep your system packages updated regularly

Conclusion

This guide covered the essential steps for working with firewall on a VPS environment. For more advanced configurations, refer to the official documentation. Don't hesitate to reach out to our support team if you need help with your specific setup.

Was this article helpful?