基本上用ports裡面stable版就可以了。安裝方式
cd /usr/ports/net-p2p/amule
make install clean
啟動時使用/usr/local/rc.d/amuled start 就可以了。
使用rc.conf的開機啟動方式是
amuled_enable="YES"
amuled_user="amule_username"
amuled_home="amule_user_home"
我用adduser方式,新增一個amule的帳號作為amule專用。
再來$HOME/.aMule裡面要設定好amule.conf與遙控用的remote.conf。因為我是從ubuntu將原來舊的amule設定檔搬過來沿用,所以只有密碼要更改,產生MD5密碼的方式是
echo "Your_Password" | md5
amuled的ec使用tcp 4712,然後amuleweb再用tcp 4711連過去amuled。
因此amule.conf設定檔就會像這樣:
.....
[ExternalConnect]
UseSrcSeeds=0
ShowPercent=1
ShowProgressBar=1
AcceptExternalConnections=1
ECAddress=
ECPort=4712
ECPassword=e8c8290466a68dcfca77892de133d661[WebServer]
Enabled=1
Port=4711
PageRefreshTime=60
UseGzip=1
UseLowRightsUser=0
Password=e8c8290466a68dcfca77892de133d661
PasswordLow=e8c8290466a68dcfca77892de133d661
Template=
而remote.conf用amuleweb -w產生後修改就會像:
Locale=zh_TW.UTF-8
[EC]
Host=
Port=4712
Password=d8ade3c53d42aeecdc5b38f0cb97770a
[Webserver]
Port=-1
Template=php-default
UseGzip=0
AllowGuest=1
AdminPassword=d8ade3c53d42aeecdc5b38f0cb97770a
GuestPassword=29ae15264bcf14cd41a7be377a1a9226
假設你防火牆設定正確,接下來你就可以啟動amuled(連帶啟動amuleweb),然後用瀏覽器連線http://your_ip:4711/ 就會進入web介面騎驢。
本文接下來摘錄我新增的ipfilter / ipnat規則
ipfilter:
pass in quick proto udp from any to any port = 4665
pass in quick proto udp from any to any port = 4672
pass in quick proto tcp from any to any port = 4712 keep state
pass in quick proto tcp from any to any port = 4711 keep state
pass out quick proto tcp from any to any port = 4712 flags S keep state
pass out quick proto tcp from any to any port = 4711 flags S keep state
pass out quick proto tcp from any to any port = 4662 flags S keep state
pass out quick proto udp from any to any port = 4665
pass out quick proto udp from any to any port = 4672
ipnat:
map vr0 172.16.64.0/24 -> 0/32 portmap tcp/udp 10000:60000
rdr vr0 0.0.0.0/0 port 4662 -> 172.16.64.9 port 4662
rdr vr0 0.0.0.0/0 port 4665 -> 172.16.64.9 port 4665
rdr vr0 0.0.0.0/0 port 4672 -> 172.16.64.9 port 4672
rdr vr0 0.0.0.0/0 port 4711 -> 172.16.64.9 port 4711
由此可以看出我是用jail隔離amule的環境。
沒有留言:
張貼留言