# Anonymous voting, how do they do this?

**URL:** <https://www.ruby-forum.com/t/anonymous-voting-how-do-they-do-this/88980>\
**Category:** Rails\
**Created:** [March 16, 2007, 3:16am UTC](https://www.ruby-forum.com/t/anonymous-voting-how-do-they-do-this/88980 "2007-03-16T03:16:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 16, 2007, 3:16am UTC](https://www.ruby-forum.com/t/anonymous-voting-how-do-they-do-this/88980/1 "2007-03-16T03:16:12Z")

</div>

at [wikio.com](http://wikio.com), you can vote anonymously, how do you think they are  
doing this…?

- if I vote in FF, then clear cookies, it remembers I voted
- if I then vote in IE, it still remembers I voted…

so it must be server side, but checking source IP would not be very  
good…

never mind, I just tried from my wifes machine, it still thinks I have  
already voted, so must be source IP

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 16, 2007, 4:58am UTC](https://www.ruby-forum.com/t/anonymous-voting-how-do-they-do-this/88980/2 "2007-03-16T04:58:02Z")

</div>

how do they get source ip? i thought sometimes, your ip address can look  
similiar to other peoples on same cable provider?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 16, 2007, 5:53am UTC](https://www.ruby-forum.com/t/anonymous-voting-how-do-they-do-this/88980/3 "2007-03-16T05:53:23Z")

</div>

The IP address is provided to you by your web server which gets it  
from the TCP/IP connection between the client and the server. The  
three-way handshake makes it impossible to spoof the IP address, so  
this scheme works to ensure no dupes, but it causes problems if you  
share a connection behind NAT. If someone on your shared connection  
votes before you do, you’re SOL.

In your rails controllers, you can get the IP via request.remote\_ip.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 16, 2007, 7:18am UTC](https://www.ruby-forum.com/t/anonymous-voting-how-do-they-do-this/88980/4 "2007-03-16T07:18:43Z")

</div>

Eden Li wrote:  
but it causes problems if you

> share a connection behind NAT.

any better solution?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 17, 2007, 7:47am UTC](https://www.ruby-forum.com/t/anonymous-voting-how-do-they-do-this/88980/5 "2007-03-17T07:47:34Z")

</div>

CAPTCHAs, or requiring logins that are email verified… There are a  
number of solutions; they all have their pros and cons and which one  
is right for you depends on your app…

On Mar 16, 2:18 pm, Nanyang Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
