Could you provide a more detailed description of your use case?
500 meters is a rather long distance for WiFi, is it really that far in between the devices or just a mistype? You will not be able to achieve high speeds or reliable connection and high gain directional antenna is also needed for the router on a pole.
Suppose you do manage to make the devices see each other, configuration, as suggested here, should help you to achieve your goal.
If you want to receive WAN from the router on a pole, some ethernet to fiber conversion would be more manageable, as light can travel such distances without much of a loss. Then the in the building would simply require its LAN interface to be configured as a DHCP client.
If you need to retrieve some monitoring data from the device on the pole, there are other remote management options, which are listed here. In particular you can consider SMS, email, MODBUS/MQTT data to server solutions or, for the most convenience, Teltonika's remote management system RMS.