aMule Bug Tracker - aMule
View Issue Details
0000536aMuleExternal Connpublic2005-08-14 00:242005-08-20 23:32
rg3 
Kry 
normalfeaturealways
resolvedfixed 
2.0.3 
SVN 
0000536: Add option to specify listening address in amuled
When you lauch amuled from the command line and perform netstat --listen --tcp --program, you can see it is listening on the configured port and all the addresses. A new option in the config file to specify the listening address (or hostname or interface) would be useful to make amuled a little bit more secure in some cases without requiring superuser privileges to configure the machine firewall.

I'm running amuled+amuleweb to control aMule from somewhere else and I thought that would be useful, so only amuleweb is listening to the world while amuled can be set to listen only on the loopback interface.

Thanks a lot for aMule and your efforts. Keep up the good work!
No tags attached.
Issue History
2005-08-14 00:24rg3New Issue
2005-08-14 00:33rg3Note Added: 0001220
2005-08-14 01:19KryNote Added: 0001223
2005-08-14 01:20KryStatusnew => assigned
2005-08-14 01:20KryAssigned To => Kry
2005-08-14 02:13KryNote Added: 0001224
2005-08-14 02:19rg3Note Added: 0001225
2005-08-14 02:49KryNote Added: 0001226
2005-08-14 02:51KryNote Added: 0001227
2005-08-14 07:39KryNote Edited: 0001227
2005-08-14 12:31rg3Note Added: 0001228
2005-08-14 16:33KryNote Added: 0001229
2005-08-14 23:37rg3Note Added: 0001230
2005-08-14 23:50KryStatusassigned => resolved
2005-08-14 23:50KryFixed in Version => CVS
2005-08-14 23:50KryResolutionopen => fixed
2005-08-14 23:50KryNote Added: 0001231
2005-08-20 23:32KryNote Added: 0001244

Notes
(0001220)
rg3   
2005-08-14 00:33   
I was talking to Kry at #amule and he said it would be useful to post this. I'm not an expert in wxWhatever at all and this is what I found while Googling for 5 minutes, so I don't consider it accurate at all. Anyway:

The class wxSocketServer lets you specify the binding address:
http://www.wxwidgets.org/manuals/2.6.1/wx_wxsocketserver.html [^]

It uses a wxSockAddress which has a derivate class wxIPaddress which has a derivate class wxIPV4address that lets you specify the hostname:
http://www.wxwidgets.org/manuals/2.6.1/wx_wxipaddress.html [^]
(0001223)
Kry   
2005-08-14 01:19   
You mean the EC port or any aMule port?
(0001224)
Kry   
2005-08-14 02:13   
Ok, I just added support for opening EC and aMule ports just on selected ips.

Please test it (I did some tests, but I'd like you to try):

Open a new CVS aMule (from 14/08/2005)

Close it

open ~/.aMule/amule.conf
There are 2 lines: Address= and ECAddress=. Put there the ips (i.e. for your problem just set ECAddress=127.0.0.1)

Try connecting to EC from localhost and from outside.

And please report the results. :)
(0001225)
rg3   
2005-08-14 02:19   
Thanks, I'll do some tests when I come back to my workplace and post the results. :)
(0001226)
Kry   
2005-08-14 02:49   
Waiting for them.
(0001227)
Kry   
2005-08-14 02:51   
(edited on: 2005-08-14 07:39)
P.S: Notice this is only for listening connections. Outgoing connections must be routed properly.

This is not a problem on EC, but it is on aMule, where we do connect to remote instead of beign connected.

edited on: 08-14-05 07:39
(0001228)
rg3   
2005-08-14 12:31   
Er... sorry for my bad explanation. I was referring exclusively to the EC address:port pair, eventhough I suppose being able to specify the address in other listening ports and connections would be eventually useful. I'm now rereading everything I wrote and realizing the confusion I created, sorry.
(0001229)
Kry   
2005-08-14 16:33   
You did still not report :P
(0001230)
rg3   
2005-08-14 23:37   
Well, Kry, a big big thanks (and $10!) for implementing it. It seems to work alright for me. I'm anticipating the next stable release.
(0001231)
Kry   
2005-08-14 23:50   
Good to know.
(0001244)
Kry   
2005-08-20 23:32   
Are you still around? If you are, mind I changed the position of the item on amule.conf, so it's reset, but I added a new item on gui to set it. Make sure you set it back (by, i.e., closing amule, updating, running it again, closing it, and editing amule.conf)