You mention changing 'www' to ssh and telnet, but the only place www is mentioned in your code is a comment. Also your last few sentences aren't clear. Are you saying that pinging ssh/ telnet should fail on the host you specify? Are you sure that the server has something listening on the http port?