LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Dos Attack on SSH Tunnel (https://www.linuxquestions.org/questions/linux-networking-3/dos-attack-on-ssh-tunnel-544264/)

SPEEDEX 04-08-2007 08:53 AM

Dos Attack on SSH Tunnel
 
Hello Guys
I have a small anonymizer service on the web , I have a squid server listening on 127.0.0.1 port 3128. and a ssh server which users connect to it and use it as a tunnel to connect to squid server. very simple setup.
recently I have encountered a problem I have no idea how to solve it. one or some of my users are infected by a worm , and they start to send lots of request for big zip or wmv files through ssh tunnel to my squid server. and it causes my incoming traffic to go very high. in fact it is a ddos attack. but I can not know which user or IP is attacking , because they come from ssh tunnel and in squid log all of requests come from IP 127.0.0.1 like this :

1176020701.378 12063 127.0.0.1 TCP_MISS/200 109973 GET h**p://a1327.r.akareal.net/ondemand/7/1327/2110/973023381/voice.download.akamai.com/2110/wm/voa/nenaf/pers/video/PERSIAN_LATEEDITION1830v0407.wmv? - DIRECT/80.15.236.205 application/octet-stream

do you have any idea how to debug this problem ?

jiml8 04-08-2007 11:15 AM

Why not set up SSH to log connections, then match the offender by time stamps, then block the IP?

SPEEDEX 04-08-2007 11:21 AM

I already have the SSH log , you mean to check when a user is connected and then check the time of start of attacks ? I have many users , so in 5 minutes could be lots of logins. also I can not be sure the attacker starts to attack in the exact time which he is connected , may be it starts to attack some minutes after connnecting. isnt there a more reliable solution ?

jiml8 04-08-2007 11:58 AM

SSH keeps a table mapping localhost ports to actual IP addresses. It has to do that otherwise it couldn't forward. You need to access that table. Try netstat and see what that gives you.


All times are GMT -5. The time now is 11:56 PM.