Skip to contentSkip to conversation

I need a clever solution for two Bittorrent machines behind a firewall

DISCUSSION Brad Morgan 4 participants 4 messages Nov 18, 2004 – Nov 19, 2004

lore
Share & tools
lore
#0 lore raw

I'm using a Linux firewall with IPTables as my home firewall. Both my son and I are gamers and my son actually has a couple of machines so he and his friends can game together.

Blizzard's new World of Warcraft uses a custom Bittorrent for their patches and it looks like both my son and I will be playing this one. At the moment, I manually switch the target computer before going online (we only had one login during the open beta) but since you don't know until you login if there's a patch and we may buy two copies for simultaneous use, I'd like to figure out how a clever way to switch the target machine "on the fly" so we both take advantage of the increased download speed of a cooperating Bittorrent client. I've experienced the speed difference because our first install didn't have any ports open and it was SLOW (over an hour). The second install took maybe 10 minutes to download patches with the proper ports open and forwarded.

Anyone have any suggestions? Pointers to solutions or other places to ask the question will be gladly accepted.

Regards,

Brad Morgan

#1 lore raw
Quoted 16 lines · Brad Morgan

I'm using a Linux firewall with IPTables as my home firewall. Both my son and I are gamers and my son actually has a couple of machines so he and his friends can game together.

Blizzard's new World of Warcraft uses a custom Bittorrent for their patches and it looks like both my son and I will be playing this one. At the moment, I manually switch the target computer before going online (we only had one login during the open beta) but since you don't know until you login if there's a patch and we may buy two copies for simultaneous use, I'd like to figure out how a clever way to switch the target machine "on the fly" so we both take advantage of the increased download speed of a cooperating Bittorrent client. I've experienced the speed difference because our first install didn't have any ports open and it was SLOW (over an hour). The second install took maybe 10 minutes to download patches with the proper ports open and forwarded.

Quoted 2 lines

Anyone have any suggestions? Pointers to solutions or other places to ask the question will be gladly accepted.

i suppose it depends on the flexibility of the bittorrent client. the one i use has the option to specify my "incoming TCP listen port." so each machine behind the firewall just needs to specify a different port, and you can forward accordingly.

i'm not familiar with the game your talking about or how it implements its BT client.

-j

--
"The only monster here is the gambling monster that has enslaved your
mother! I call him Gamblor, and it's time to snatch your mother from his neon claws!"
--The Simpsons

#2 lore raw
In reply to Brad Morgan
Quoted 1 line · --On Thursday, November 18, 2004 10:03 AM -0700 Brad Morgan…

I'm using a Linux firewall with IPTables as my home firewall.

Take a look at "port triggering". This is a feature in the Linksys WRT54G, which uses uClinux under the hood. When an outbound connection is seen to a particular port, a port forwarding rule is installed for the internal client. I'm guessing this is done by monitoring the iptables logs and installing a custom chain on demand that's removed after a period of inactivity.

#3 lore raw

Hi,

Quoted 8 lines · Kenneth Porter

--On Thursday, November 18, 2004 10:03 AM -0700 Brad Morgan

Quoted 1 line · <[email protected]> wrote:

I'm using a Linux firewall with IPTables as my home firewall.

Take a look at "port triggering". This is a feature in the Linksys WRT54G, which uses uClinux under the hood. When an outbound connection is seen to a particular port, a port forwarding rule is installed for the internal client. I'm guessing this is done by monitoring the iptables logs and installing a custom chain on demand that's removed after a period of inactivity.

I'm using a simple script to detect when someone connects to the battle.net . The basic Idea is to check for /proc/net/ip_conntrack for battle.net connections. Here is a simple version which has to be run every n minutes. Greets
Jochen Radmacher
---- cut here ----
#!/bin/bash
CONNECTED=0;
#Bugfix for netfilter bug 227
IPADDR=$(/sbin/ifconfig | grep -i "ppp0" -A 1|grep "inet addr"|cut -d " " -f 12|
cut -d ":" -f 2)

#you can repeat the following 4 lines with different argument for grep to make an 'OR' egrep '213\.248\.106\.' /proc/net/ip_conntrack |grep $IPADDR >/dev/null if [ "$?" -eq "0" ]; then
CONNECTED=1;
fi

if [ "$CONNECTED" -eq "1" ]; then
#do something
iptables -A ....
else
iptables -D ....
fi