Friday 25 July 2008

SSH - Shitty Stupid Hack

Well this week has been rather filled with disaster, one of which is my remote ssh connection got broken. It seemed that if I logged in on the local network all was fine, logging in from the outside world the ssh connection would hang if i got the password right!

Now I have seen this question asked many many times on forums and websites generally the questions are like this

ssh hangs after authentication
ssh crashes from outside
ssh stops when correct password is entered but fine when i get the password wrong
dlink router stops ssh connection
nat breaks ssh connection

and the answers they get are varied and frankly dumb!
they say stuff like update firmware on routers, change MTU, stand on your left leg and hum the theme to neighbours...
well here is the actual answer for thousands of people....ready??

get on your linux box and making sure your root run this command

/sbin/iptables --table mangle --append OUTPUT --jump DSCP --set-dscp 0x0