Yes, you can read about ideas at https://www.google.com/search?q=1+kilometer+WiFi but these are never sure or reliable. As to security you use the WPA2 that we have today and change the key every week or when you see unexpected traffic or connections.

This also might cause your ISP to cut you off since most have you agree not to share with neighbors. You have to know this ahead of time so you don't get a surprise disconnection.