aMule Forum
English => aMule Help => Topic started by: terry on October 28, 2004, 08:16:59 AM
-
Hi
I read this page
http://www.amule.org/wiki/index.php/Firewall
and they say
I have to set
iptables -A INPUT -p tcp --dport XX -j ACCEPT
iptables -A INPUT -p udp --dport XX+3 -j ACCEPT
iptables -A INPUT -p udp --dport YY -j ACCEPT
but in my test
I only set
iptables -A INPUT -p tcp --dport XX -j ACCEPT
I can do serch, and file download, and I see other can get file from my share directory.
Should do I open last 2 udp port?
and what is diffreant open them, last 2 udp port?
Thanks
-
You can find all the ports and their purposes used by eMule (and by aMule) at http://www.emule-project.net/home/perl/help.cgi?l=1&topic_id=122&rm=show_topic
-
Thanks :D
-
This is a old thread, but for a different view with anyone who has a similar problem try this:
iptables -t nat -A PREROUTING -p tcp --dport 4662 -j DNAT --to-destination xxx.xxx.x.x
xxx.xxx.x.x being destination machine ip address.
Was the only one that worked for me (Debian)
You will need 3 lines, ports
tcp 4662
udp 4665 (4662+3)
udp 4672
You can actually use any port (I think) above 1024 as long as one of the UDP ports is 3 numbers higher than the TCP port...
/viz
(this is about the limit of my knowledge in Linux! :)
-
thanks :)
this confrms that the second part of that wiki article works hehe
Greetings!
-
When you set iptables,how do you save the new settings?
I tried with "iptables-save", but when I reboot the system (SuSE 9.1) new settings disappear. Thanks for help!
-
no idea. never used iptables here. I guess you have to set all those lines into ~/.bashrc or ~/.profile or /etc/profile or /etc/bashrc or whatever, or into someo init script (depending on which mode you want the firewall to be executed).
You should ask at some linux forum, but I'm 70% sure I'm right on my guess ;)
Greetings!
-
On RedHat 9.0 you can edit the file /etc/sysconfig/iptables, which has the same format as iptables-save, so you can do iptables-save > /etc/sysconfig/iptables, but i suggest editing the file. RedHat sets up iptables from this file upon system start, and some services directly edit the already-set-up iptables configuration upon their startup (e.g. ntpd), and you probably don't want their (sometimes not static) things saved.
You can also add these three lines to /etc/rc.d/rc.local or something similar on your system, so it'll get executed as the last part of the system startup.
I just found this one for SuSe http://forum.amule.org/thread.php?threadid=4297&sid= :)