R
R
rumata2011-04-07 09:07:23
SSH
rumata, 2011-04-07 09:07:23

ssh not connecting when transmission-daemon is running?

Everything happens on ubuntu server 10.10 x64. I'm trying to connect to my home computer via ssh to an external address. At a time when transmission is working and actively pumping, it does not work out - it writes "Connection timed out". Transmission pumps not to the full width of the channel, but only to half. If you connect ssh while transmission is not downloading anything and start the torrent using transmission-remote, then the current ssh session does not fall off and works fast enough, but you can’t connect a new session. Didn't find anything in the logs. top shows about 1-3% CPU usage. ping to the address of the machine is successful and without packet loss. The machine is a gateway to the Internet and two more workstations are connected through it - they work fine. What could be the problem with connecting a new ssh session?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
rumata, 2011-04-07
@rumata

I found the reason for this behavior. But I don't understand the meaning. For a long time on the Internet, I found a ready-made script for iptables.
part of it But there is no NEW in the last line in state. Adding it there, everything worked. But why then let me go without it and with the torrent download turned off. This is not clear. I really want to understand.
#Incoming SSH traffic from Internet
$IPTABLES -N allow-ssh-traffic-in
$IPTABLES -F allow-ssh-traffic-in
#Flood protection
$IPTABLES -A allow-ssh-traffic-in -i $WAN -m limit --limit 1/second -p tcp --tcp-flags ALL RST --dport ssh -j ACCEPT
$IPTABLES -A allow-ssh-traffic-in -i $WAN -m limit --limit 1/second -p tcp --tcp-flags ALL FIN --dport ssh -j ACCEPT
$IPTABLES -A allow-ssh-traffic-in -i $WAN -m limit --limit 1/second -p tcp --tcp-flags ALL SYN --dport ssh -j ACCEPT
$IPTABLES -A allow-ssh-traffic-in -i $WAN -m state --state RELATED,ESTABLISHED -p tcp --dport ssh -j ACCEPT

A
AlexeyK, 2011-04-07
@AlexeyK

It is possible that transmission is using too many internal ports, so there are no free connections left for new connections, try limiting the number of simultaneous connections, but this is just a guess.

S
Smolka, 2011-04-09
@Smolka

One to one the situation was on debian 6 (without X) + rtorrent (daemon).
After starting rtorrent, ssh fell off after a couple of minutes. Further the machine responds, but it is impossible to be cut on ssh to it in any way.
It turned out that there was simply not enough RAM (384 Mb). Reduced the number of connections per torrent from 300 to 10. I'm thinking of adding more RAM and limiting the number of simultaneously downloaded and distributed torrents so as not to return to the question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question