aMule Forum

English => aMule Help => Topic started by: Axl_Mas on October 23, 2005, 07:45:42 PM

Title: Amule and firewall...some problems
Post by: Axl_Mas 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
Title: Re: Amule and firewall...some problems
Post by: Axl_Mas on October 31, 2005, 12:32:14 PM
250 views and no iptables experts?
Title: RE: Amule and firewall...some problems
Post by: miceliux 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
Title: Re: Amule and firewall...some problems
Post by: wardevil 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....