1

I am working on integrating reCAPTCHA with my registration page and everything seems working fine except one strange issue.

I have tested this code on all local machines and well on our test server (window) and everything is working. We have just setup a Linux server (Cents OS 6.0) and was testing my implementation which is not working on Linux machine. No matter if I fill captcha correctly or not, I am always getting false as a response.This is my Java code by which I am calling Google's reCAPTCHA API for validation

reCaptcha.checkAnswer(request.getRemoteAddr(), request.getParameter("challengeValue"),
                request.getParameter("responseValue"));

I have tried to debug code but not able to find any success so far, only difference I have noticed is about request.getRemoteAddr().

request.getRemoteAddr() is giving different IP for Linux and Window server. (Same browser)

Both Window and Linux server are running on a single Machine with same IP (some kind of virtual box)

I am using recaptcha4j to integrate reCaptcha API.

For me problem seems to be from Linux setting or configuration which is not known to me.I even talk to our IT guy and he also seems to be clueless.

I have tested this on Ubuntu and it was working fine on that machine even..seems like some configuration issue with Cent OS6

2 Answers 2

1

I'm sure that the difference from Your test server and production server is - firewall.
Check that it accept output new request to Google servers and established from them.

If You use iptables one way to reach this claim:

iptables -A INPUT -i eth0 -p tcp -s <google_ipv4_1> -j ACCEPT  
iptables -A OUTPUT -o eth0 -p tcp -d <google_ipv4_1> -j ACCEPT
0

You need to identify the browser as well as the OS, and any plugins that you are using that might be relevant. Pay attention to anything that might be affecting how cookies are handled.

Does your problem occur on this linux host with a different browser? What about on a different linux host?

IF your virtualbox instances are using bridged networking, they may be using different IPs obtained from DHCP, despite being on the same physical host.

1
  • Well I have tried with all available browsers with no luck.One things which I came to know about this test machine is that it have both Linux as well window running on same machine. Jul 9, 2014 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .