This article explains 2 methods you can use to block your wifi from your neighbors.
Method 1 – Use a Mac-Filter
A mac filter is a feature which is available on a wireless router. The mac-filter takes the hardware / mac-address of a device and checks if the traffic is indeed coming from the specific device. If the mac-address of the device is unavailable in the router, the connection would be dropped. The mac-address of devices in the home network can be identified and updated in the wireless router. When an unauthorized user tries to connect, it would be disconnected as the mac-address of the device would be unavailable.
Method 2 – Restrict DHCP and reduce signal
DHCP is the service on the router which is used to provide dynamic IP address to users on the network. Wifi access can be blocked by limiting the number of IP addresses in the DHCP service. By default, the DHCP service is configured to allow around 200+ IP address. This can be limited to the required range. For example, if the number of devices in the network is 5, you set the DHCP to assign only 5 IP address. The start range and end range can be specified. A screenshot on a DLINK router is shown below with IP address range from 192.168.0.2- 192.168.0.5
This would ensure that only users in the network would receive valid IP address. This should also be accompanied by reducing the signal strength of your wireless router to ensure that the signal does not reach your neighbors home.
The above two methods would help you in blocking your wifi from your neighbors.