I own a vps with Ubuntu 10.04 and i want to make it just accessible to me and one friend mine through dyndns hosts. It's possible block all others ips?
First of all, check out Denyhosts. Add his(and your IP) to it and that will prevent others from connecting. Also, set 'AllowUser hisname yourname in sshd_config.
I wouldn't recommend ftp. Check out sftp. If you're using ssh already, you might as well use sftp too.
Blocking http is going to be trickier. Check out .htaccess but even that isn't ideal.
Most of this is for naught if you're using dynamic ips(most home connections).
If you have a software firewall (and you should), I'd suggest using that. That way, you're blocking connections lower down on the stack and you're potentially reducing the scope of vulnerabilities. Plus, malicious users would be less likely to discover network services that you don't want them to know about.
I'm personally fond of iptables myself, but others such as shorewall and ufw should work fine too. Just be careful when setting stuff up. =)