Difference between revisions of "BitTorrentBlockingIPs"

From Theory.org Wiki
Jump to: navigation, search
m
m (cleaned up)
 
Line 3: Line 3:
 
From: michaelmoorr
 
From: michaelmoorr
 
Sent: Tuesday, May 20, 2003 12:23 PM
 
Sent: Tuesday, May 20, 2003 12:23 PM
Subject: [[BitTorrent]] Feature request
+
Subject: BitTorrent Feature request
 
 
  
 
hi!
 
hi!
Line 11: Line 10:
 
create a feature in bittorrent tracker that allowed only certain IP
 
create a feature in bittorrent tracker that allowed only certain IP
 
adresses to connect, (local adresses it is).
 
adresses to connect, (local adresses it is).
 +
 
We downloaded the source code, but we had some difficulties to
 
We downloaded the source code, but we had some difficulties to
 
understand it (first time with Python :P). We'd like to know if u
 
understand it (first time with Python :P). We'd like to know if u
Line 19: Line 19:
  
 
== Answer 1 ==
 
== Answer 1 ==
Check tracker.py, around lines 207 - 210 to get an idea of how to reject
+
Modify tracker.py (was around lines 207 - 210) to get an idea of how to reject certain IPs.
certain IPs.
 
Line numbers are for latest CVS version (afaik). (Ed. as of
 
 
 
If you were feeling tricky, you could also hook into geoip to check that people were connecting from the same country.
 
  
 +
If you are feeling tricky, you could also hook into geoip to check that people were connecting from the same country.
  
 
== Answer 2 ==
 
== Answer 2 ==
 
Use linux and use iptables.
 
Use linux and use iptables.
  
iptables is used to construct firewalls. It could
+
iptables is used to construct firewalls. It could be used to allow specific IP's on specific ports easily enough. Drop all others.
be used to allow specific IP's on specific ports
 
easily enough. Drop all others.
 
  
Probably a lot more ways to do this but this will
+
Probably a lot more ways to do this but this will work.
work
 
  
 
== Answer 3 ==
 
== Answer 3 ==
Setup some smart firewall rules to block external access.
+
Setup some smart firewall rules to block external access. It doesn't have to be linux.
It doesn't have to be linux.
 
  
 
----
 
----
Back to [[BitTorrentFAQ]]<br>
+
Back to [[BitTorrentFAQ]]
Part of [[Category:BitTorrent]]
+
 
 +
[[Category:BitTorrent]]

Latest revision as of 12:10, 7 February 2008

http://groups.yahoo.com/group/BitTorrent/message/2890:

From: michaelmoorr
Sent: Tuesday, May 20, 2003 12:23 PM
Subject: BitTorrent Feature request

hi!

Due to traffic restrictions applied in our country, we would like to
create a feature in bittorrent tracker that allowed only certain IP
adresses to connect, (local adresses it is).

We downloaded the source code, but we had some difficulties to
understand it (first time with Python :P). We'd like to know if u
could give us some hints in how to do it (i mean what part of the
source should we change), or if there is a working java, c++, etc
port of bittorrent.

Answer 1

Modify tracker.py (was around lines 207 - 210) to get an idea of how to reject certain IPs.

If you are feeling tricky, you could also hook into geoip to check that people were connecting from the same country.

Answer 2

Use linux and use iptables.

iptables is used to construct firewalls. It could be used to allow specific IP's on specific ports easily enough. Drop all others.

Probably a lot more ways to do this but this will work.

Answer 3

Setup some smart firewall rules to block external access. It doesn't have to be linux.


Back to BitTorrentFAQ