aMule Forum
English => aMule Help => Topic started by: MickeyRat 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?
-
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
-
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.
-
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???
-
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.)
-
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
-
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).
-
(So chances are your ports are NOT correctly set up)
-
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.
-
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.
-
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.
-
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: "
-
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?
-
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.
-
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.
-
Well, I'm not familiar with the output of ufw, but plain iptables output comes with information like INPUT/OUTPUT src-/dst-port interface usw. So just look for the port aMule uses per default and the ports you configured aMule to use.
-
I think I solved my problem and I owe you guys a thanks for trying to help. I wasn't using the firewall that the iptables commands effects. I was using UFW which is completely different. Once I figured out where I was supposed to open the ports properly, it started working. I do want to thank you for your time and effort on this though.