Some websites leverage Google's reCAPTCHA service to provide a means to stop bots from abusing the site. This blog post describes how to identify what outbound firewall IP addresses and ports that are needed.

What is reCAPTCHA?

  • A free service that protects your site from spam and abuse.
  • Uses advanced analysis techniques to tell humans and robots apart.
  • Comes in the form of a widget that you could easily add to a page.

There are essentially two approaches to opening up your outbound firewall: (1) Allow outbound access to all Google IP addresses on ports 80 and 443 (see below), or (2) use a proxy server to access control on

Identifying Google IP Addresses and Ports

  1. Run the following commands from the servers that is hosting your code that requires access to Google reCAPTCHA:
dig -t TXT \
dig -t TXT \
dig -t TXT \

Note that:

  • <– lists IPv4 addresses
  • <– lists IPv6 addresses
  • <– lists IPv4 addresses

2. If you are opening up your firewall for IPv4 ports, then copy all IP subnets identified in the output, and open up ports 80 and 443 to them.

For example: