aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: High ID nothing logged but, Kad connects then goes firewalled  (Read 6526 times)

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
High ID nothing logged but, Kad connects then goes firewalled
« on: November 27, 2011, 09:53:50 PM »

I'm using a Linksys WRT54GS2 V1 router that is running dd-wrt.  My OS is Linux Mint 11.  aMule version is 2.2.6.  I know there's a later version but, it's a bit of a hassle to install when it's not in the Mint repositories.  OTOH if someone can tell me that will definitely fix this problem, I'll look into doing it. 

I've forwarded the ports in the router (UPnP is debatable in the version of dd-wrt I'm using.) and used iptables to open up the ports for both in the OS.  I've also tried switching the ports to 6662, 6672, and 6665.  However, whenever I connect I get a high ID and within a few seconds Kad connects.   Some time after that it will go firewalled and stay that way unless I restart aMule.  Then it will connect for a while and go firewalled again.   The fact that it connects for a while is a good indicator that I have the ports set up right.  I don't see any real change in the number of Kad connections firewalled or not. The download speeds seem a little faster when it's not firewalled but, that could be all in my head.

I know there are other threads on a similar topics but, I don't like to hijack and I haven't seen a solution that's worked for me.

Anything else I can try?
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #1 on: November 27, 2011, 11:46:01 PM »

No idea if 2.3.1 would improve anything here, but I see no other option to try.

http://wiki.amule.org/index.php/HowTo_Compile_In_Ubuntu
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #2 on: November 28, 2011, 12:17:44 AM »

No idea if 2.3.1 would improve anything here, but I see no other option to try.

http://wiki.amule.org/index.php/HowTo_Compile_In_Ubuntu

Thanks for the reply.  I kind of doubt it's going to help but, I don't see anything else to try either.  I try to do my homework before posting.  I guess I did a good job. :)  I'll get to installing the new version in the next day or two and let you know whether it works.
Logged

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #3 on: November 28, 2011, 08:20:06 PM »

Well, I got 2.3.1 compiled and, as expected, it was a bit of a pain.  Those instructions weren't 100% right for my system.  That's to be expected.  It's my system.  Anyway, it runs fine but, the only difference I've noticed it that it logged the fact that Kad went firewalled.   I connected at 12:59:57 and Kad connected within seconds as usual.  That was logged at 13:00:00.   Then at 14:04:09 Kad went firewalled.  I expect it to stay that way till I restart aMule.

Nothing else to try???
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #4 on: November 29, 2011, 07:36:44 PM »

Delete preferencesKad.dat in your config dir.
Then you will get a new place in the Kad network.
Just in case something is weird in your part of the net.
It won't affect your credits.

(Just an idea, I don't have much hope this helps.)
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #5 on: November 30, 2011, 12:55:24 AM »

Delete preferencesKad.dat in your config dir.
Then you will get a new place in the Kad network.
Just in case something is weird in your part of the net.
It won't affect your credits.

(Just an idea, I don't have much hope this helps.)

I just did it.  No reaction so far. 

I have a few more datapoints now.  Kad connnected shortly after I started aMule and stayed connected for 1:05.  Almost exactly 13 hours later it connected again for 1:03.  That was about 14 hours ago and it hasn't connected since.  That may not mean anything but, it seems awfully uniform for a coincidence.  The pertinent portions of the log are below.   I went ahead and included a couple error messages that are probably perfectly normal but, you never know.  It helps to provide all the info I can.

2011-11-28 14:34:27: amule.cpp(1888): Connected to Kad (ok)
2011-11-28 15:39:34: amule.cpp(1890): Connected to Kad (firewalled)

2011-11-28 20:23:55: SafeFile.cpp(474): SafeIO::EOF: Attempt to read past end of file.

2011-11-29 03:34:33: amule.cpp(1888): Connected to Kad (ok)
2011-11-29 04:37:03: amule.cpp(1890): Connected to Kad (firewalled)

2011-11-29 07:51:30: MuleUDPSocket.cpp(174): Unknown port receiving a UDP packet! Ignoring

Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #6 on: November 30, 2011, 02:05:39 AM »

Ok->Firewalled states are just a result of Kad rechecking the state. It does not mean it knows it is ok, but that it doesn't yet know it's firewalled. Once the test connections don't get any response after a while, you go back to firewalled state (hence the uniformity).
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #7 on: November 30, 2011, 02:06:23 AM »

(So chances are your ports are NOT correctly set up)
Logged

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #8 on: November 30, 2011, 06:24:41 AM »

I yield to your greater knowledge and won't ask why it connected again after 13 hours.  I really hate it when people ask stupid questions when I'm trying to help in my area of expertise. :)   There's only one thing I can see that I might have done wrong.  In dd-wrt for port forwarding you identify an application.  I put in aMule.  I've changed it to amule.  Can you tell me how the router is going to see the app?  Of course, if that change works, I'll probably know soon enough.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #9 on: November 30, 2011, 11:14:49 PM »

The router won't know what app it is, the name is just for reference in the rules table.

Are you correctly forwarding the port types? One is TCP, two are UDP.
Logged

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #10 on: December 01, 2011, 12:32:09 AM »

I didn't think the app mattered if I was forwarding the ports to a specific IP address but, my networking expertise is limited.  I just went ahead and opened all three ports for both TCP and UDP.   Here's the script I run as root for the OS:

iptables -A INPUT -p tcp --dport 6662 -j ACCEPT
iptables -A INPUT -p tcp --dport 6665 -j ACCEPT
iptables -A INPUT -p tcp --dport 6672 -j ACCEPT
iptables -A INPUT -p udp --dport 6662 -j ACCEPT
iptables -A INPUT -p udp --dport 6665 -j ACCEPT
iptables -A INPUT -p udp --dport 6672 -j ACCEPT


I can't really show the router entries without a pic but, here's what they are:

amule   6665   Both     192.168.1.107   6665   X
amule   6672   Both     192.168.1.107   6672   X
amule   6662   Both     192.168.1.107   6662   X   

The columns are application, port from, protocol (both is both tcp and udp), IP address, port to and enabled.  I couldn't get them to line up. :)  My lap top has a permanent lease on 192.168.1.107 and that is the address it's using.
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Offline Offline
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #11 on: December 01, 2011, 12:28:57 PM »

iptables -A INPUT -p tcp --dport 6662 -j ACCEPT
....

I guess these are on your client, as I would expect something like FORWARD and POSTROUTING on your router.  Maybe you should turn your Firewall on your client off to see if your router is configured right. If your router is ok, you shouldn't need one on a client behind it anyways.

If you want to use it on the client aswell if the router is ok, turn on logging to see what happens:

iptables -A OUTPUT -j LOG --log-prefix "FW OUTPUT: "
iptables -A FORWARD -j LOG --log-prefix "FW FORWARD: "
iptables -A INPUT -j LOG --log-prefix "FW INPUT: "
Logged
Homefucking is killing prostitution

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #12 on: December 02, 2011, 02:09:50 AM »

Okay, I'm beginning to think this isn't a local problem.  Unless the router is getting wonky because of the number of connections or something.  It does connect and then finds it's not connected right at an hour later.  From what you've said, it could have disconnected at any time during that hour but, it appears to connect once.   Here's what I did.  I turned off the firewall on the client and ran with just the router's firewall.  As usual it connected to Kad and showed up firewalled an hour later.  So, I turned the client firewall back on and put my laptop in the router's DMZ.  So, the router's firewall wasn't there for me.  www.grc.com indicated that my client firewall was pretty good.  So, I poked the port holes in the client firewall and fired up aMule.  Nothing changed.  It connected with a high ID Kad connected and an hour later Kad went firewalled.

The only thing left is to turn on logging as you suggest and see if that shows anything.  The only problem is that I'm not sure I'd recognize what is significant in the log.  Also how wordy is this thing going to be?  Would it be a bad idea to turn on logging and go to bed?
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Offline Offline
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #13 on: December 02, 2011, 06:15:34 PM »

The only thing left is to turn on logging as you suggest and see if that shows anything.  The only problem is that I'm not sure I'd recognize what is significant in the log.  Also how wordy is this thing going to be?  Would it be a bad idea to turn on logging and go to bed?

Depends on your harddiskspace. You get a logentry for every blocked connection(-attempt), so depending on how exposed you are, it can be much, but you can just try for a short time (around 2 Minutes to see how much outout you get, and if you don't get thousends of entries, it save to leave it running at least till your problem begins. For what is significant: aMule-ports (both standard and your settings).

And Btw: As this is your client, Logging for FORWARD isn't needed.
Logged
Homefucking is killing prostitution

MickeyRat

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
Re: High ID nothing logged but, Kad connects then goes firewalled
« Reply #14 on: December 03, 2011, 01:14:43 AM »

Well I tried your commands for logging and they seemed to kill my connections.  Did a little research and did a ufw logging on.  Yeah it's pretty wordy.  No way I can sift through that.  What should I search for?  I left it on for about 10 mins.
Logged
Pages: [1] 2