# Iptables (again) + Limewire

## suntzu2007

Hi,

After having searched the forum, but being able to come to no conclusion, I'll have to bother people again - sorry. I just emerged LimeWire, which worked fine. LimeWire starts fine, however doesn't appear to connect. It detects a firewall, which I don't have. My iptables are configured as follows (6346 being the port LimeWire uses...?):

```
#!/bin/sh

iptables -P INPUT DROP

iptables -P FORWARD DROP

iptables -P OUTPUT DROP

iptables -A INPUT -i lo -j ACCEPT

iptables -A INPUT -m state --state INVALID -j DROP

iptables -A INPUT -i eth0 -p udp -m udp --sport 53 -m state --state ESTABLISHED -j ACCEPT

iptables -A INPUT -i eth0 -p tcp -m tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT

iptables -A INPUT -i eth0 -p tcp -m tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT

iptables -A INPUT -i eth0 -p icmp -m state --state ESTABLISHED -j ACCEPT

iptables -A INPUT -i eth0 -p tcp -m tcp --sport 6346 -j ACCEPT

iptables -A OUTPUT -o lo -j ACCEPT

iptables -A OUTPUT -m state --state INVALID -j DROP

iptables -A OUTPUT -o eth0 -p udp -m udp --dport 53 -j ACCEPT

iptables -A OUTPUT -o eth0 -p tcp -m tcp --dport 80 -j ACCEPT

iptables -A OUTPUT -o eth0 -p tcp -m tcp --dport 443 -j ACCEPT

iptables -A OUTPUT -o eth0 -p icmp -m state --state NEW -j ACCEPT

iptables -A OUTPUT -o eth0 -p tcp -m tcp --dport 6346 -j ACCEPT

```

----------

## Sadako

Hello again, I see you still sticking with the restrictive iptables rules.

What I've found with my own experiences with the same, is that some p2p clients actually send out data from completely random ports so will not work with the iptables setup you (and I) have.

Try stopping/flushing the iptables rules just for a moment to allow all traffic, and then start limewire while you have tcpdump running in an xterm, and you should see all the ports that are actually being used.

I haven't tested that many p2p clients since I started using such strict rules, but I can tell you that both gtk-gnutella send data from random ports, while azureus only uses  the ports it's configured to use.

I suppose we can add limewire to the list of clients which doesn't play nice.

Assuming I'm right about this being the issue, then at the very least you'll need to allow all outgoing traffic.

Anyway, completely off topic, but I find gtk-gnutella to be a much better gnutella client than limewire.

It has extremely powerful filters, and is written in C, so doesn't need any java jdk or jre to run.

----------

## suntzu2007

Thanks once again for your help  :Smile:  Greatly appreciate it. Or should I say: Go raibh maith agat! - Ta me i mo chonai i  gCo Chorcai, ach bionn mo Gaeilge dona  :Wink: 

----------

## Sadako

 *suntzu2007 wrote:*   

> Thanks once again for your help  Greatly appreciate it. Or should I say: Go raibh maith agat! - Ta me i mo chonai i  gCo Chorcai, ach bionn mo Gaeilge dona 

 That's just depressing...

Your irish is way better than mine.

I was born in cork, have family there.

Are you far from the city?

----------

## suntzu2007

Well, living 2 hours away (down by the Mizen/Schull). Moving up the city to start work in Aug though. Yourself?

----------

## suntzu2007

Mhhh, still no luck with limewire. It just doesn't seem to connect. I can't emerge gtk-gnutella - it says compile failed. I'm using gtk-gnutella 0.96.1. I tried downloading another version, but still no luck....

----------

## Sadako

 *suntzu2007 wrote:*   

> Mhhh, still no luck with limewire. It just doesn't seem to connect. I can't emerge gtk-gnutella - it says compile failed. I'm using gtk-gnutella 0.96.1. I tried downloading another version, but still no luck....

 I've never seen gtk-gnutella fail to compile.

Could you post the error?

Does limewire work with no iptables rules loaded?

Currently living in Dublin btw, but I tend to move around quite a bit.

----------

## suntzu2007

No, Limewire doesn't work (neither with nor without loading iptable rules).

Re Gnutella: The only thing it gives me is:

```
!!! ERROR: net-p2p/gtk-gnutella-0.96.1 failed.

Call stack:

  ebuild.sh, line 1564:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  gtk-gnutella-0.96.1.ebuild, line 47:   Called die

```

----------

