Score:-4

Disallow Bluethooth Discovery

mx flag

I run Debian and I do need Bluetooth to connect to my headset, but I don't want devices can see my laptop nor be able to connect to it.

I tried the following commands, but they just kill the Wifi; if I re-enable the wifi in my gnome-session, the bluetooth is discoverable.

rfkill unblock 0
bluetoothctl discoverable no
rfkill block 0

I also tried the following command, but its effect isn't persistent and it doesn't work either.

hciconfig hci0 noscan

I would like to handle it like I do with TCP-IP connections with ufw.

deny incoming && allow outgoing

Do you have any idea?

cn flag
Ray
Debian isn't supported here... But I think it's easy to answer your question. I don't think it's possible. If you have your headphones in a crowded bus, *everyone* in your vicinity can see it. Surely you've noticed this when you turn on bluetooth on your phone. But you have to "pair" them in order for the two to connect. So, what you're asking for doesn't seem (as far as I know) possible for any bluetooth device...so I don't expect Ubuntu/Debian to provide that for you. Just my opinion...
guiverc avatar
cn flag
Please refer https://askubuntu.com/help/on-topic, Ubuntu and official *flavors* of Ubuntu (https://ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes.
user654789384 avatar
mx flag
@Ray Debian isnt supported here... ?? this is not just a "ubuntu forum"!
cn flag
Ray
Yes, this is just an "ubuntu forum". As you're new here, it's understandable that you were not aware of this. I'm unsure why you think you know better? Please see the comment before your's, which gives you a link explaining what is covered.
user654789384 avatar
mx flag
Sure pal, but Ubuntu inherits most of Debian, so why should you just be able to ask questions to Ubuntu?
Score:0
gh flag

Run

sudo btmgmt
[mgmt]# info
(information obtained)
[mgmt]# select hci0
Selected index 0
[hci0]# discov no
[hci0]# exit

If the name of the device that you get is different from hci0 you should use that. You can check with # info (under current settings) that the change took place.

The same can be achieved with

sudo hciconfig hci0 pscan

Check with

hciconfig -a

that you have UP RUNNING PSCAN, without ISCAN (inquiry scan).

If persistence of the setting is a problem, you could add a cron job that runs on boot.

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.