Skip to main content
Scraper API

How to Fix 'Checking the Proxy and the Firewall' Errors: The 2026 Guide

6 min read

The Complete Guide to Checking Proxy and Firewall Configurations

When you encounter the message "Checking the proxy and the firewall"—often accompanied by error codes like ERR_CONNECTION_TIMED_OUT, ERR_CONNECTION_REFUSED, or ERR_CONNECTION_RESET—it indicates that your browser or application cannot establish a secure connection to the target server. This is a defense mechanism where your system checks local routing rules (Proxy) and security barriers (Firewall) before allowing data transmission.

In 2025, with the rise of automated scraping and strict ISP monitoring, misconfigured settings are the #1 cause of connectivity failures. This guide explains how to diagnose and resolve these issues technically.

---

Understanding the Core Components

What is a Proxy?

A proxy server acts as an intermediary between your client (browser or script) and the destination server. When you configure a proxy: 1. Your request goes to the Proxy IP. 2. The Proxy forwards the request to the target. 3. The target replies to the Proxy. 4. The Proxy returns the data to you.

If the proxy settings in your OS are stale (pointing to a dead server), the browser will "check" the proxy, wait for a response that never comes, and result in a Timeout.

What is a Firewall?

A firewall monitors incoming and outgoing network traffic based on predetermined security rules. If your firewall rules are too strict (Deny All), or if a specific rule blocks port 443 (HTTPS) or 80 (HTTP), your connection will be Refused or Reset immediately.

---

Scenario 1: Troubleshooting via Browser (Chrome, Edge, Firefox)

Most users encounter this issue in Google Chrome. Follow this hierarchy of steps to fix it.

Step 1: Verify Automatic Proxy Settings

Browsers often inherit settings from your Operating System.

1. Open Chrome and navigate to chrome://settings/system. 2. Click Open your computer's proxy settings. 3. Ensure that: - Automatically detect settings is ON (for home networks). - Use setup script is OFF (unless required by your corporate IT). - Use a proxy server is OFF (unless you are manually routing through a specific IP).

Step 2: The 'netsh' Command Reset (Windows)

If settings are stuck, use the Windows Shell to reset the network stack (WinHTTP). This is the most effective method for clearing invisible proxy configurations set by malware or legacy VPNs.

Instructions: 1. Press Win + R, type cmd, and hit Enter. 2. Type the following command and press Enter:

   netsh winhttp reset proxy

3. You should see: *"Direct access (no proxy server)"*. 4. Restart your computer.

Step 3: Disable VPNs and Antivirus "Web Shield"

Applications like Norton, Kaspersky, or McAfee often install a "transparent proxy" to filter traffic. If this service crashes, your internet dies. 1. Temporarily disable your Antivirus. 2. Disconnect your VPN completely. 3. Retry the connection. ---

Scenario 2: Developer Troubleshooting (Python & Scripts)

If you are a developer building a scraper or automation tool, "Checking the proxy and the firewall" manifests as Python exceptions (e.g., requests.exceptions.ProxyError or ConnectTimeout).

Diagnosing with Python

Never assume your script has internet access. Explicitly check the environment.

Code Snippet: Diagnosing Connectivity

import requests

import sys

def check_connection(url='https://www.google.com', timeout=5): print(f"[*] Attempting to connect to {url}...") try: # First, try a direct connection (ignoring system env vars) response = requests.get(url, timeout=timeout) print(f"[+] Success! Status Code: {response.status_code}") print(f"[+] IP Used by Server: {response.headers.get('CF-Connecting-IP', 'Unknown')}") return True except requests.exceptions.ProxyError as e: print(f"[-] Proxy Error: System is trying to use a dead proxy.") print(f"[-] Details: {e}") return False except requests.exceptions.ConnectionTimeout: print(f"[-] Timeout: Firewall likely dropping packets or target is down.") return False except requests.exceptions.SSLError: print(f"[-] SSL Error: Certificate verification failed (MITM Proxy?).") return False except Exception as e: print(f"[-] Unknown Error: {e}") return False

if __name__ == "__main__": check_connection()

Common Environment Variable Errors

Check your terminal environment variables. If you see HTTP_PROXY or HTTPS_PROXY set to an old IP, your scripts will fail.

Fix:

On Windows Command Prompt

set HTTP_PROXY= set HTTPS_PROXY=

On Linux/Mac Terminal

unset HTTP_PROXY unset HTTPS_PROXY

---

Scenario 3: Firewall Rules and Port Blocking

If the proxy is not the issue, the Firewall is actively blocking the handshake.

Checking Windows Defender Firewall

1. Press Win + R, type wf.msc, and hit Enter. 2. Click Outbound Rules on the left. 3. Look for rules related to your Python executable (python.exe) or your browser. 4. If the rule is blocked (Red Icon), right-click and select Enable Rule.

Checking Firewall via CLI

To check if a specific port (e.g., 8080) is blocked locally:

Test listening on a port (Windows)

netstat -an | findstr :8080

Test connectivity to a remote port

Replace 1.1.1.1 with the target IP

telnet example.com 443

If the connection fails on 443 (HTTPS) but works on 80 (HTTP), your corporate firewall is performing Deep Packet Inspection (DPI) and blocking encrypted traffic.

---

Comparison: Common Error Codes

| Error Code | Meaning | Likely Cause | Fix Priority | | :--- | :--- | :--- | :--- | | ERR_CONNECTION_TIMED_OUT | Client waited too long. | Proxy is down; Firewall is dropping packets silently. | Check Proxy Settings (WinHTTP). | | ERR_CONNECTION_REFUSED | Server actively said no. | Target port closed; Local Firewall blocking outbound. | Check Firewall Outbound Rules. | | ERR_CONNECTION_RESET | Connection cut mid-handshake. | Antivirus "Web Shield" interference; MITM Proxy failure. | Disable Antivirus temporarily. | | ERR_PROXY_CONNECTION_FAILED | Proxy settings exist, but Proxy is unreachable. | Incorrect Proxy IP/Port in System Settings. | Remove Proxy config. |

---

Preventative Best Practices

1. Never trust manual proxy persistence: If you must use a proxy for scraping, pass it dynamically in your code (requests.get(url, proxies={'http': ...})) rather than setting it globally in Windows Settings. 2. Session Reuse: When scraping, use a requests.Session() object. It maintains a persistent connection (Keep-Alive), which is more resilient to intermittent firewall drops than opening a new TCP handshake for every request. 3. Fail-Closed Logic: If you are building high-availability scrapers, implement a circuit breaker pattern. If checking the proxy fails 3 times in a row, switch to a backup IP pool or halt execution to avoid IP bans.

By systematically isolating the Proxy layer (OS/Browser configuration) from the Firewall layer (Port/Security rules), you can resolve 99% of "Checking the proxy and the firewall" errors within minutes.

Share: