You would have to know that, your network layout and the proxies/security/firewall you have in your network. To sync the foreman server needs to be able to access the repository to sync in the internet. If your firewall filters outgoing traffic then you need to enable those outgoing connections needed to sync the repository. If you need redhat repositories it’s those hosts listed in the docs you have linked.
But you or your network/firewall admin must know how to do that exactly.
In the end your foreman server must be able to connect to the necessary servers in the internet, e.g. try