@skolnick
NAT behaviour and stateful inspection are two different things. A NAT is only stateful insofar, as it may (depending on the kind of NAT) close the punched "hole" again after a while without traffic. The rest is for the firewall/packet filters.
I meant the NA(P)T implementations in quite a lot of routers. I had to do with this kind of problems because I experimented with VoIP and NAT used to be one of the biggest problems for beginners in that field. I gave some help in forums at that time.
So I found out that a lot of methods (STUN) didn't work for me, because I always have used routers of a more 'sophisticated' kind (aka normally not working "out of the box", but a lot of possibilities instead after one invested some hours in RTFM).
For some VoIP-providers for example I always had to manually set the external SIP port to the same port number as the one I wanted to connect to. Strange things happened with the different implementations of the SIP servers.
So I tend to search for protocol problems in that same direction. But it's of course just kinda brain storming atm. Some interesting links:
RFC3489 (STUN) and
Wikipedia (NAT)I believed for some time, that I had found some link between the disconnect intervals and the amount of downloads I had. Normally I have few to none active downloads but have mostly "releases" and other uploads.
It's some time ago I used to watch all that, but I think the time Kad stayed connected, was noticeably longer, when I had some active downloads. This lead me to the conclusion, that there was some connection with the traffic on Kad.
@Kry
My ISP, for example, does not block any ports or regulate traffic (apart from technical failures on their side

).
And even if my ISP would do that - what should be the difference for them between restarting amuled and reissueing the command "connect kad" and doing the latter without the first? Both
should show the same results, when monitored from outside, I think. The only difference might be the absence (or not) of connection to some ed2k server. When I start amuled I normally enter "connect kad" first and "connect <IP>:<port>" later. Whereas I normally stay connected to some ed2k server when Kad disconnects and only try "connect kad" then.