If you're rooted, you can configure
Firewall rules to block all except Facebook, but I don't think your problem is that complex:
when I open my 3G connection the mobile automatically connects to unknown servers.
Unable to understand what that mean as I can't OPEN my 3G connection. Seems to me, either you are talking about opening web browser or
Background Data is screwing you. In the first case, make your homepage Facebook. In the second case, turn off
Background Data from
Accounts and Sync. Done!
If you want to do it with Firewall way, open Terminal Emulator. Switch to root by
su command (your device must be rooted for that). Now, execute following commands in sequence:
iptables -A OUTPUT -p tcp -d facebook.com -j ALLOW
iptables -A OUTPUT -p tcp -d * -j DROP
(Do it on your own risk after proper backups. Some devices become unstable after it.)