Cantennas, if line-of-sight, can reach miles. I wouldn't depend on it delivering a reliable connection, but it can be done if mounted high enough to avoid obstructions and implemented with excellent quality directional antennas.
But honestly, if it is miles away, the best way to access a network is to pay for an additional Internet service at the remote location and create a VPN.