Lee

Connection issues: How to get in active mode

52 posts in this topic

How to get in active mode / I have connection issues

This guide explains how to correctly forward ports for ApexDC++ and resolve any connection issues experienced. ApexDC++ has two fundamental connection modes - active and passive. Only as a last resort are people to use passive mode. Active mode allows a user to connect to more users and ultimately transfer faster.

From 1.2, users are required to forward a port for TLS in order to become active.

If you are NOT behind a router:

  1. Select the Direct Connection radio button in ApexDC++ connection settings
  2. Allow ApexDC++ in your software firewall (it should have prompted you when launched)
  3. Test active mode by clicking on the test connection hyper-link in the connection settings page
If you still experience connection time-outs or unable to connect messages, you're best following the steps below.

If you are behind a router:

Try and mimic this screenshot:

  1. First you need to use portforward.com to look up your router's model number, which should help you forward ports for ApexDC++
  2. Specify a different port for TCP, UDP and TLS (Select a number between 1024 - 65535). If you wish, TCP and UDP can utilise the same port, but you must ensure the router forwards both TCP and UDP
  3. When you have forwared the ports above on the router, open up ApexDC++ and go to Settings -> Connection settings. Select "Firewall with manual port forwarding". In the port fields, enter the port number that you are forwarding on the router.
  4. Press "Get IP Address" to automatically insert your IP. Please note: If you're IP changes, you're best checking the "Auto-update IP" feature
  5. Restart ApexDC++ and you should be able to connect properly.
draudio5 and perseus1994 like this

Share this post


Link to post
Share on other sites

A few corrections you might want to consider:

2. First you need to set up the router to forward the connections to the computer with ApexDC++. This could be called port mapping, port redirecting, port forwarding or something like that. Find out how to do this with your router / NAT in the user manual. If you dont have a user manual handy or it does not tell you, go to www.portforward.com and look for the make and model of your router in the list. Click on it, then choose DC++. Follow the instructions. If your particular model is not included, you can try with a similar model, as sometimes the user environment looks the same.

3. You need to forward one port. Select a number between 1024 - 65535, they should mostly all be available. Make sure both UDP and TCP are being forwarded on the port you choose.

4. The ports should be forwarded to the internal IP address of your DC++ computer. It usually begins with "192.168", "172.16." or "10.x.". Click on Start | Choose Run | Type cmd into the window and press ok. | A black window opens. | In the black window, type ipconfig /all. | Take note of the internal IP address of your computer and place this number in the relevant field of your router settings, to make sure the ports are forwarded to the right address.

5. When you have mapped a port on the router, open up ApexDC++ and go to Settings. Select "Firewall with manual port forwarding". In the port fields, enter the port number that you forwarded on the router.

HTH,

Goralf :)

Share this post


Link to post
Share on other sites

Very good job of convering the portforwarding guys! It's one of the most common questions asked by users and one of the hardest to give specific answers to since newer routers are changing their setup menus.

Thank you.

Share this post


Link to post
Share on other sites

Just a question, if the user has 2+ apps which randomly select ports, and the apps are allowed as files in the firewall, is there a big chance for them to get one and the same random port?

Edited by Zlobomir

Share this post


Link to post
Share on other sites

most apps that select random ports will select them in the range >=1024 <=65535. this means that there are 64512 ports for the program to guess. the likly hood of them both gettnig say port 1411 would be (1/64512)*(1/64512)=(1/4161798144). (you can correct my math now ;)). however owing to the birthday paradox if you have more applications then two choosing random ports the probability of 2 programms picking the same port will start to become expenetialy lower.

if you are really bored you code modify the emperical test at the bottom of that link to calculate how many programms need to be run before a collition will happen.

Edited by balder

Share this post


Link to post
Share on other sites

Just tried to say that IMHO manual port setting is safer. ;)

Edit: Yes, interesting article. I know the ports nos., but how many users use Apex? I bet that one day we will spend a whole lotta time on some support request concerning active mode, just because this is so unlikely. :) Cant find the link but with 2000+ users, each with 4-5+ apps taking random ports, see the picture.

--OFF About birthdays: There is not any paradox. Your birthday = ~ 9 months from... you guess. :w00t: And as we put things so, the sexual activity is not evenly distributed through the year, so just the base is not 365 days --OFF :D

Edited by Zlobomir

Share this post


Link to post
Share on other sites

if you are really bored you code modify the emperical test at the bottom of that link to calculate how many programms need to be run before a collition will happen.
well yes i was really bord so here it is as a python script

>>> ports = 64512.0

>>> prob = 0.0

>>> progs = 1.0

>>> while prob < 0.5:

...  prob = 1.0 - ((1.0 - prob) * (1.0-((progs-1.0)/ports)))

...  print "progs ", progs, " prob ", prob

...  progs = progs + 1

the answer was a suprisingly low and round number of 300. that is, you would need to have 300 programms choosing random ports before you would have 2 programms that chose the same port.

I bet that one day we will spend a whole lotta time on some support request concerning active mode, just because this is so unlikely
I agree.

--OFF in regard to your off topic point. the paradox is a probability paradox. not a statistical groupings one. the paradox is better observed in its application at finding hash collitions known as a birthday attack. however i suspect you where just being facetious so ill let you off ;)--OFF

Edited by balder

Share this post


Link to post
Share on other sites

--OFF

Sorry if this is slightly "Adult Only". Please read it when you reach 18+/21+ years according to your country regulations.

Yes, I was semi facetious, but also semi-serious. Anyway, the first formula in Birthday Attack article cause a major memory leakage in my brain. My point was that, f. ex. in UK, 30% of the teenagers... guess again (results of a survey). Further it means that there is spontaneous attraction, which is more likely to appear during the warmer part of the year (less clothes, more going out, no school, etc.). So I will be really interested if smo can dig out the interval with most birthday coincidences. ;) If this period is X:Y, I'm pretty sure that X:Y - 9 months ~ May:August

--OFF

Edited by Zlobomir

Share this post


Link to post
Share on other sites

just wanted to say that the 300 programms above gives. Means that there is a 50% chance of two programms choosing the same port. 700 programms gives you a 99% chance that two will choose the saem port

--OFFi have taken this to the lounge :)OFF--

Edited by balder

Share this post


Link to post
Share on other sites

Hi

I have set up port forwarding as per guide but am only getting a few hits in search any help when i try the connection tester says Failed to connect on TCP 40000

Share this post


Link to post
Share on other sites

Hi

I have set up port forwarding as per guide but am only getting a few hits in search any help when i try the connection tester says Failed to connect on TCP 40000

There are only two situations: working search / not working search. So no. of hits may just indicate you need to search in more hubs. As per Connection tester, it is not working right now, (and this is not our fault, so it is not possible to say when it will be OK again. If you can search and download - your port forwarding is correct.

Share this post


Link to post
Share on other sites

Hi

I have set up port forwarding as per guide but am only getting a few hits in search any help when i try the connection tester says Failed to connect on TCP 40000

I'd suggest using a lower port. Something above 1100 though.

Share this post


Link to post
Share on other sites

I recall we have discussed it before, and there was not any argument for using a certain port, except the "known" ones like 21, 23, 25, 110, 80, 8080 etc., which should be avoided. Now I managed to dig out some article in this spirit: http://www.muq.org/~cynbe/muq/mufref_564.html , and although it is a bit complicated, the vital part is that the author recommends 10,000 -> 65,535 range.

Share this post


Link to post
Share on other sites

Updated the guide to utilise ApexDC++'s unique features to help get into active mode. :)

Share this post


Link to post
Share on other sites

After completing this entire guide it still fails to connect on the TCP but UDP connects fine.

I have switch so that the NetBIOS is activated over TCP/IP wich i asume is necessary when having a static IP.

Is this a common problem what can be wrong?!

I'm pretty much a dummie when it commes to this(obviously) :stuart:

Grateful for help though!

Share this post


Link to post
Share on other sites

After completing this entire guide it still fails to connect on the TCP but UDP connects fine.

I have switch so that the NetBIOS is activated over TCP/IP wich i asume is necessary when having a static IP.

Is this a common problem what can be wrong?!

I'm pretty much a dummie when it commes to this(obviously) :stuart:

Grateful for help though!

If you're using the check connection link in the connection settings, it could be giving you false TCP failure.

Share this post


Link to post
Share on other sites

Step number 3 is empty in the "no router guide".

Also, I think you should rename "If you are behind a router:" to "If you are behind a router/firewall":

It's highly recommended to chose a port from 49152 to 65534.If you want to chose a port < 49152, please make sure that port isn't used.Here are several links, there you will find a list of popular and used ports:

http://www.iana.org/assignments/port-numbers

http://en.wikipedia.org/wiki/List_of_well-...rts_(computing)

http://ports.tantalo.net/

Share this post


Link to post
Share on other sites

How can I resolve this problem:

Failed to connect on TCP 1080

Connected on UDP 1080

Where is my mistake in configuration?

Share this post


Link to post
Share on other sites

How can I resolve this problem:

Failed to connect on TCP 1080

Connected on UDP 1080

Where is my mistake in configuration?

Try downloading and uploading something, see if it works. Sometimes the connection test fails TCP even though it's working.

Share this post


Link to post
Share on other sites

Hi guys

could you pin this guide? Its the most important guide for new users.

Share this post


Link to post
Share on other sites

As for the guy with problems with his TCP, I keep getting a Partial Connection and I can't search for anything. Uploading seems to be working ok. ApexDC++ seemed to work fine until the day I changed router, I'm now with a D-Link DIR-615. I followed all the steps on how getting Active and getting a Static IP adress, and I think I forwarded the ports correctly (used the port 3456), but my TCP still won't work and Apex DC++ still won't search. It does work in Passive, but I want to get in Active. I have Windows XP, but the UPnP doesn't seem to work with this router...

Anyone can help?

Thanks

Share this post


Link to post
Share on other sites

Go to portforward.com and make sure that your ports are forwarded correctly. Also, reboot the router.

Share this post


Link to post
Share on other sites