Skip to content

Instantly share code, notes, and snippets.

@ammgws
Last active May 28, 2025 11:00
Show Gist options
  • Save ammgws/1dbd8b3bb38b588c1bb8b3f70dd4fd2c to your computer and use it in GitHub Desktop.
Save ammgws/1dbd8b3bb38b588c1bb8b3f70dd4fd2c to your computer and use it in GitHub Desktop.
Missing ufw samba application profile in /etc/ufw/applications.d

Am using a samba share on Ubuntu 16.04 server, and wanted to enable Samba traffic in ufw using sudo ufw allow from 192.168.8.0/24 to any app Samba comment 'allow samba from local' which returned the error "ERROR: Could not find a profile matching 'Samba'".

Cause: I was using the minimal amount of tooling required to use Samba (cifs-tools) on my server, which doesn't include the Samba application file.

Fix: install the samba package... or manually create the file:

sudoedit /etc/ufw/applications.d/samba

[Samba]
title=LanManager-like file and printer server for Unix
description=The Samba software suite is a collection of programs that implements the SMB/CIF$
ports=137,138/udp|139,445/tcp
@fraff
Copy link

fraff commented Jul 27, 2021

thanks for this

@ammgws
Copy link
Author

ammgws commented Jul 27, 2021

Glad it was able to help someone!

@erikreed
Copy link

erikreed commented Jan 9, 2022

+1 thanks for sharing. First google result now for "ufw samba profile".

@ionovanton
Copy link

Thanks! It helped a lot.

@ooobii
Copy link

ooobii commented Jan 21, 2023

Thank you so much! 😁

@eosdev-x
Copy link

Thank you!

@marlonmarcello
Copy link

Thank you!!!

@jonathonp3
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment