1. Home
  2. Docs
  3. Website Firewall
  4. Configuration
  5. Testing Firewall Before Changing the DNS

Testing Firewall Before Changing the DNS

To make sure the Firewall is working as expected before changing the DNS records, you can configure your operational system to use the Sucuri Firewall IP address when accessing your website.

First, you must find your Firewall IP address by accessing the main page of your domain’s dashboard:

Firewall IP Overview

Editing the ‘hosts’ file

If you are using Microsoft® Windows, press the Windows key, search for "notepad", right-click Notepad on the option "Run as administrator". Once the Notepad is open, go to File -> Open and open the "c:\windows\system32\drivers\etc\hosts" file. The "c:\" disk could be another letter, just make sure you’re acessing the Windows root folder.

If you are using an Unix-like system, run your favorite text editor as root by using "sudo" command and open the "/etc/hosts" file.

Inside the file, at the very end, add a line following this structure:

192.124.249.xx  www.example.com example.com

Replace "192.124.249.xx" with your Firewall IP address and change "example.com" to your domain. Save the file and you should be able to view your website now through the Firewall network.

For Microsoft® Windows users, you may also need to search for "cmd.exe", right-click, "Run as administrator" and then insert "ipconfig /flushdns" on the Prompt so the changes takes effect.

Please, use the incognito mode of the browser to make sure it doesn’t cache the DNS.

Was this article helpful to you?