I do not like foreign and domestic. It frequently causes confusion, also by people who work in the market (@Ethan S, you use what is widely used, so excuse my rant).
I decide to demonstrate with GBPUSD (CCY1CCY2); GBP is foreign, USD domestic since it's quoted in units of domestic currency per unit of foreign currency. In other words, if S=1.4, one needs 1.4 USD to get one GBP.
Now, assume GBP interest is 2%, USD rate is 1% and the forward is 1.3. Fair FWD according to CIP is well above the actual market quoted forward.

Simple introductory textbooks assume borrowing and lending is at the same rate and there is no restriction to borrow abroad. Now, it is optimal to borrow in GBP, and invest in USD.

As @fesman points out; can you borrow abroad? Could just say it is always only one side of the pond that can do this arbitrage? Well, the actual question is, can you invest abroad? The answer is not so different really. From a retail investor side, the answer is probably not. That said more than one in five Polish mortgages was held in Swiss francs.
However, the FX and rates interbank market is something vastly different. There is strong competition and low regulatory burden, which results in very small spreads between interest rates at which banks are willing to pay for deposits and the interest rates that banks charge for loans. The Eurodollar market is very liquid. Moreover, there is a very liquid cross currency swap market. You should actually take this basis into consideration when doing the exercise.
One could argue this is all very much US centered thinking but even if the transaction is between COP and ARS, USD plays a role as one could always do the series of transactions via USD.
This is what professional tools computing this are doing. E.g. on Bloomberg, one can use FXFA
to check CIP or imply any direction. It is displaying sided pricing (bid-ask), and flexible in terms of interest rates being used (LIBOR, OIS...).
Even if you were to find apparent arbitrage, it is likely that after considering all aspects (regulation in different countries, tax implications, default risk of counterparties, political risk, exchange controls..), this will quickly look unlikely to be riskless arbitrage. Ex-ante, you never know what happens...