Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just spun up a new RackSpace VPS using Ubuntu. I'm normally using CentOS so forgive me for any Ubuntu newbie mistakes.

I set up an SSH tunnel using Putty and tried to connect via SQLYog, something I've done on CentOS countless times.

I'm receiving the error message

Lost connection to MySQL server at 'waiting for initial communication packet', system error: 2

I'm connecting via local

SQLYog 8115 root

Tunnel 8115

Within my.cnf I have bind-address and skip-networking isn't there. At this point I've exhausted my knowledge.


My iptables are

target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:domain
ACCEPT     udp  --  anywhere             anywhere             udp spt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:mysql
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1337
DROP       all  --  anywhere             anywhere

I just tried removing all entries in IPTABLES and this solved the issue. Could someone let me know what I had wrong?


share|improve this question
Can you check the value set for "AllowTcpForwarding" in your 'sshd config' file (found in /etc/ssh/ directory). If it is "no", try changing it to "yes" and restart the ssh server (sshd daemon) and try connecting again. – Sathish D Oct 1 '13 at 9:00
I have both AllowTcpForwarding yes and PermitTunnel yes, I found these from early reports of the same issue. – Adam G Oct 1 '13 at 10:47
up vote 1 down vote accepted

I recommend you check if you have a firewall (iptables) or some security software (apparmor / selinux) enabled and running. Also the error log would be helpful here.

This manual page can help you debug the problem.

share|improve this answer
Just updated my answer, definitely an issue with my iptables. Any advice on a better set up? – Adam G Oct 1 '13 at 10:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.