0

I am doing some research on Udev rules for USBs. Most articles I found are centered around blocking USB devices on Ubuntu using Udev. Can accomplish firewall like functionality by writing Udev rules? eg: 1. Allow data copy into the USB while blocking USB contents be executed on the computer? 2. Restrict USB connected smartphones to be charged only, while prohibiting any data transfer either directions. 3. Allowing USB connected smartphones to be charged only, while prohibiting USB cameras, USB soundcards etc..

Thanks in advance,

  • 1
  • Use the noexec and nodev mount options. 2. udev recognize "smartphones" but don't mount them. udev recognize "the USB" and mount it with the options above. 3. udev recognize "USB cameras, USB soundcards etc" and do nothing with them. Read man mount and as many of the mount.* man pages as you need.
  • – waltinator Dec 16 '19 at 21:23
  • One question I answered has similar topic, It is not easy categorize something still evolving. I still see many new USB devices. Any way it may help if you lower the bar https://askubuntu.com/q/531445/26246 . Another thing, USB was designed without taking in account the security. – user.dz Apr 14 '20 at 23:38