aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Amule and firewall...some problems  (Read 3056 times)

Axl_Mas

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 73
Amule and firewall...some problems
« on: October 23, 2005, 07:45:42 PM »

I use this lines in my iptables script:
Code: [Select]
#aMule INPUT
iptables -A INPUT -i ppp0 -p tcp --dport 4662 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i ppp0 -p udp --dport 4672 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i ppp0 -p udp --dport 4665 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

#aMule OUTPUT
iptables -A OUTPUT -p tcp --dport 4662 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p udp --dport 4672 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p udp --dport 4665 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

I have this problems:
1)In the consolle where i launch amule i receve very frequently this message:
"Client UDP port returned an error: 2
WARNING! Discarded packet due to errors while sending."

2)I can connect only at the servers that use the port "4661 (80,443,25)".

Who can help me?
 :(
ps:i use the last CVS version
« Last Edit: October 23, 2005, 07:46:57 PM by Axl_Mas »
Logged

Axl_Mas

  • Jr. Member
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 73
Re: Amule and firewall...some problems
« Reply #1 on: October 31, 2005, 12:32:14 PM »

250 views and no iptables experts?
Logged

miceliux

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
RE: Amule and firewall...some problems
« Reply #2 on: October 31, 2005, 04:44:47 PM »

I don't understand why you put the state condition. The port must be open for all the packets.

I have something like this:
Code: [Select]
iptables -A INPUT -i ppp0 -m ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i ppp0 -p tcp --dport 4662 -j ACCEPT
...
also, you should let everything go out, you are blocking your own connections to all ports but those especified (I suppose that your policy is DENY).

It's very probable that the connection tracking in the kernel can't follow the eMule protocol/UDP packets.

You can debug your rules appending a rule like this at the end of every chain:
Code: [Select]
iptables -A INPUT -i ppp0 -j LOG --log-prefix "INPUT_POLICY_DROP: "Good luck!  :P
Logged

wardevil

  • Sr. Member
  • ****
  • Karma: -1
  • Offline Offline
  • Posts: 402
Re: Amule and firewall...some problems
« Reply #3 on: November 01, 2005, 12:04:24 AM »

Has a mandriva user i dont know why you people dont use shorewall as your default firewall since it helps you a lot on managing iptables rules....
Install shorewall, try to figure out how it works and you will have your iptables rules managed very easy...

Cheers....
Logged
Linux user nÂș289016 at Linux counter