Score:0

How do I block port 1234 in localhost without killing the process in MacOS

bb flag

I have a requirement to close a port without killing the process to test out a certain fallback scenario. I am using MacOS and I am unable to figure out how to do this, can someone please help?

I tried setting iptable rule using pfctl, but that did not work (Ref - https://superuser.com/questions/505128/deny-access-to-a-port-from-localhost-on-osx) : (sudo pfctl -sr 2>/dev/null; echo "block drop quick on 127.0.0.1 proto tcp from any to any port = 1234") | sudo pfctl -e -f - 2>/dev/null

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.