Zend certified PHP/Magento developer

Intercepting network requests as a computer

(Originally posted on Network Engineering)

I have a MacBook Pro version 11.0.1 and an iPad. Is it possible to set up a hotspot from my Mac in such a way that once my iPad is connected to it, I can intercept requests and send back arbitrary data? For example, if my iPad is connected to the hotspot and then sends a request to download an audio file from the internet, I am looking to be able to “respond” to the request with an audio file of my choice, possibly different from that on the internet. Preferably, I would like to do this without downloading any external tools and using only apps that come with the iPad or Mac such as Terminal (and some coding using Python if needed), but I am happy to download some tools if needed.

(If this counts as a product recommendation question, where may I go to ask this question? Apologies if this counts as off-topic)