Asıl soruyu cevaplamak için, kendi uygulama dosyanızı nasıl oluşturacağınız hakkında, sadece windows INI dosya formatını (yuck) kullandığını bilmeniz gerekir.
[appname]
title=1-liner here
description=a longer line here
ports=1,2,3,4,5,6,7,8,9,10,30/tcp|50/udp|53
Bağlantı noktaları, protokolü sınırlamak için / udp veya / tcp ile birden çok bağlantı noktası belirtebilir, aksi halde varsayılan olarak her ikisine de sıfırlanır. Protokol bölümlerini |. İle ayırmalısınız.
Öyleyse, gerçek hayattaki bir dizi örnek için:
[puppet]
title=puppet configuration manager
description=Puppet Open Source from http://www.puppetlabs.com/
ports=80,443,8140/tcp
[AMANDA]
title=AMANDA Backup
description=AMANDA the Advanced Maryland Automatic Network Disk Archiver
ports=10080
Uygulamanın birden çok sürümünü, apache'den olduğu gibi tek bir dosyada listeleyebilirsiniz:
===start of apache2.2-common file===
[Apache]
title=Web Server
description=Apache v2 is the next generation of the omnipresent Apache web server.
ports=80/tcp
[Apache Secure]
title=Web Server (HTTPS)
description=Apache v2 is the next generation of the omnipresent Apache web server.
ports=443/tcp
[Apache Full]
title=Web Server (HTTP,HTTPS)
description=Apache v2 is the next generation of the omnipresent Apache web server.
ports=80,443/tcp
===end of file===
Uygulama dosyanızı tanımladıktan sonra, /etc/ufw/applications.d dizinine koyun, ardından uygulama tanımlarını yeniden yüklemek için ufw'ye söyleyin
ufw app update appname
ufw app info appname
Şunun gibi bir şeyle kullanın:
ufw allow from 192.168.1.10 to any app amanda
ufw allow amanda
192.168.1.10 varsayımı, amanda sunucunuzun IP adresidir.