Firewall: External Content Blocked

August 6, 2013 4.8k views
I followed the firewall guide here: https://www.digitalocean.com/community/articles/how-to-setup-a-basic-ip-tables-configuration-on-centos-6 However, I'm not able to view images from other websites and recaptcha cannot connect to validate captcha input. http://www.google.com/recaptcha/api/verify
15 Answers
> However, I'm not able to view images from other websites and recaptcha cannot connect to validate captcha input.

Are they on a website and you cannot access them? I'm not sure what you mean -- please elaborate
External images, so hosted on other websites, in img src tags on my website.

The recaptcha url sends a request for validation and gets a response back as to whether it matches.
The IPTables rules should not affect that. The problem is on your end - try accessing your website from another computer/network/browser. Are you mixing http/https content?
I figured it was some kind of blocked port that stopped traffic from external sources reaching my site.

My website is accessible by all.

No there is no https content.
Try deleting all of your iptables rules (as root):

iptables-save > ~/iptables_backup && iptables -F


If that doesn't fix it, iptables isn't what's causing the issue.
I get permission denied on that statement even when I sudo
Run this command then:

sudo su -c "iptables-save > ~/iptables_backup && iptables -F" root
I did

sudo service iptables stop

and the issue remains, is that the same thing as you suggested trying?
the issue of not being able to load the images*

the command worked fine
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
Is a recaptcha-not-reachable error from the ReCaptcha.pm perl module. I've tried a number of verify URLs including

http://www.google.com/recaptcha/api/verify
http://api-verify.recaptcha.net
Recaptcha and external images used to work fine on my old shared hosting, so it must be some configuration issue?
It must be a configuration issue. Disabling iptables didn't fix it therefore the firewall isn't blocking it :]
This is how I'm trying to get the images (Perl)

my $img = LWP::UserAgent->new->request(new HTTP::Request GET => $url);

$img->is_success is always false

This used to work fine on my old server so I'm not sure what's going on, any ideas?
dodgy perl module, fixed image issue now, thanks :)
Awesome, glad to hear that! :]
Have another answer? Share your knowledge.