Help - Search - Member List - Calendar
Full Version: Define outgoing ports
eMule Plus Forums > Development > Development
Zom
From what I have read eMule+ uses the ephemeral ports range for outgoing connections.

In order to ensure specific routing for outgoing traffic through an alternate public IP, so that I can ensure correct routing for incoming traffic trough that same public IP, I would like to specify the range of ports used for outgoing UDP and TCP connections to a set different from the standard ephemeral port range.

How can I do this?
muleteer
eMule Plus only assigns random ports on first install. After that they remain the same unless changed manually.

To change, click preferences, and then the connections tab. Change TCP and UDP ports as desired. Advisable to restart the client. Some firewalls need you to reboot the computer as well. tongue.gif
Zom
QUOTE(muleteer @ May 3 2010, 18:35)
eMule Plus only assigns random ports on first install. After that they remain the same unless changed manually.
*



Thanks - but I am talking about outgoing ports, not incoming ports. I know how to set the "client" ports and what that setting does. Those settings do not influence the "outgoing" traffic ports.

Any other ideas? mellow.gif
Aw3
It uses what system networking stack is allocating by default -- kind of arbitrary port number for outgoing connections.
There's no way to specify a range of the ports to use for this application.

The other think I don't understand is if you want to send packets over 2 different connections out, how do you expect to get anything back?

Or maybe you just want to use a particular connection for the eMule Plus only. In this case it uses the default system connection to communicate.
Zom
QUOTE(Aw3 @ May 4 2010, 10:26)
use a particular connection for the eMule Plus only
*


Sort of. I want to use a separate public IP for all P2Ps, including eMule Plus.

To do that for eMule Plus I need to steer all outgoing connections via that IP so that the responding incoming connections use the same IP. I can do it for servers by specifying routings for their IPs, but I cant do it for other clients because I cant know their IPs and I cant route all ephemeral ports. It would work if I could route a specified port range.

Is there any chance this feature could be included in a future version? I think others would use it if it was there.
Aw3
One thing is too have default system connection for P2P smile.gif. That way it will be automatically.
The other thing which can be done is to bind application connections to the particular interface through its IP address. Official eMule has some code to do that, but I can't say how to use it (it could be through manual editing of preferences.ini file).

Technically, it can be ported, but I personally don't even have an environment to test it.
Zom
Thanks for taking an interest. biggrin.gif

QUOTE(Aw3 @ May 4 2010, 12:38)
One thing is too have default system connection for P2P smile.gif. That way it will be automatically.
*

Unfortunately, without knowing the ports used, P2P content can only be determined AFTER the connection is made. That is OK for shaping and blocking, but not for routing.

QUOTE
The other thing which can be done is to bind application connections to the particular interface through its IP address. Official eMule has some code to do that, but I can't say how to use it (it could be through manual editing of preferences.ini file).
*
That sounds like an ideal solution. If eMule Plus could be told which gateway/publicIP to use it would solve my problem elegently.

QUOTE
Technically, it can be ported, but I personally don't even have an environment to test it.
*
I do. If you want to throw something at me to test that feature - please do. I am willing to spend as much time as is reasonably required to achieve a solution.
Aw3
I will take a look, but I don't promise.
Zom
QUOTE(Aw3 @ May 4 2010, 13:20)
I will take a look, but I don't promise.
*
That is all I can ask. Let me know if I can help.
Aw3
I have some code ready for you to try. Do you build yourself or you need a binary?
Zom
QUOTE(Aw3 @ May 13 2010, 12:17)
I have some code ready for you to try. Do you build yourself or you need a binary?
*

Most excellent! That was quick! w00t.gif

I don't normally build, so it would be great if you could do a binary for me to test. biggrin.gif
Aw3
Here's the build.
You need to add BindAddr=<IP> to the [eMule] section of the preferences.ini.

I moved the following connections to be on the specific interface:
- TCP/UDP p2p
- TCP/UDP server communication
- WebServer
- IRC
- LanCast
- MobileMule

I'm not sure how much you can try, but it would be nice if you can try at least IRC and WebServer.

Please post here how it goes.
Zom
QUOTE(Aw3 @ May 14 2010, 14:41)
Please post here how it goes.
*

Installed the new version tonight. So far it works.

I havent tried everything yet, but basic server and p2p comms binds as expected and can be routed as required.

The webserver appears on the bound IP as expected and can be NATted accordingly.

I have never used IRC, LanCast or MobileMule. I will have a readup and see if I can readily test them.

So far very good. biggrin.gif biggrin.gif biggrin.gif
Zom
QUOTE(Aw3 @ May 14 2010, 14:41)
Please post here how it goes.
*

MobileEmule works as expected, appears on the bound IP and can be NATted.
Aw3
I don't think you can really test LanCast, but for IRC you can just click Connect button on the IRC page. If you get the list of channels and connect to the default one (emule+, if I remember correctly), we can assume it works.

Thanks a lot for trying it out.
Zom
QUOTE(Aw3 @ May 17 2010, 07:07)
Thanks a lot for trying it out.
*

You are welcome - it helps me out a lot having the feature.

IRC works fine.

I think the addition is a success. smile.gif

Any idea why I cant PM?
Aw3
Thanks again for the testing.

Regarding PM: http://emuleplus.info/forum/http://emuleplus.info/forum/index.php?showtopic=11501
Zom
Did you know that in this build the Downloads|Progress column doesnt stay where it is put after shutdown and restart of emule+?
Are you interested in reports of any other issues?
Aw3
QUOTE(Zom @ May 23 2010, 02:52)
Did you know that in this build the Downloads|Progress column doesnt stay where it is put after shutdown and restart of emule+?
Are you interested in reports of any other issues?
1) Please explain in details, as I don't see any problem. Does it change order? Let's say it was 4th column, then it becomes 6th after restart, is it something like this?
You do properly close/restart, right? Not the one caused by Windows shutdown. If application is closed by Windows shutdown, sometimes it's not fast enough to save settings.
2) Definitely
Zom
QUOTE(Aw3 @ May 24 2010, 02:53)
You do properly close/restart, right?
*


Yes, this is happening across a controlled application close and start, not a windows shutdown.

I am having trouble reliably reproducing this problem. It is still happening, but I cant find a predicatable sequence that could be tested. There is a chance it has something to do with having the preferences.ini open for edit at application close time, but that doesnt seem to be 100% reproducable either. crying.gif

I will persist in finding a reproducable sequence to report.

Also, I have noticed that sometimes when I go to move a column, Speed in my case, I can drag it to its new location, but it doesnt stick, and snaps back to its original position. For example if I move Speed from the left of Progress to the right of Progress, it often doesnt stick, but if I move Progress from the right of Speed to the left of Speed it always sticks. Same result, different behaviour.

Maybe its related.

Stay tuned ...
Aw3
If preferences.ini is opened for editing by some other application, you will get into trouble for sure.

You can monitor stuff through preferences.ini as well. The following items keep state of the download list:
DownloadColumnWidths=
DownloadColumnHidden=
DownloadColumnOrder=

Preferences.ini is saved on close, plus every hour (if I remember correctly), or when you change settings in the preferences dialog.
DonGato
It's not wise to edit the .ini file while eMule Plus is running. I wouldn't do it if you want to retain many settings and counters.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.