Score:0

How do I use UFW to block a device in Ubuntu hotspot?

vn flag

I have a laptop running Ubuntu 20.04, which connected to the internet via ethernet. I have setup a WiFi hotspot on this machine, so that I can share its internet connection.

Say, I have third device (a mobile phone), with IP A.B.C.D, which is connected to this hotspot. How can I use UFW (or iptables) to block any communication from and to the third device (i.e., A.B.C.D)?

I tried the following:

sudo ufw insert 1 deny to A.B.C.D from any
sudo ufw insert 1 deny from A.B.C.D to any

but the third device can still communicate with the outside without any issue

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.