eilandert / deb.myguard.nl

issue tracker for deb.myguard.nl packages
https://deb.myguard.nl
1 stars 0 forks source link

WARN: "Invalid ports in profile 'Nginx Full'" #6

Closed droplinxuser closed 1 month ago

droplinxuser commented 1 month ago

I got this warning when using UFW with your Nginx repo from Ubuntu.

WARN: "Invalid ports in profile 'Nginx Full'"

eilandert commented 1 month ago

Okay, I can't test that, I am not a ubuntu or ufw user

Can you edit /etc/ufw/applications.d/nginx and change 80 to 80/tcp? I think that might be the problem. If so, I can change it in the package

droplinxuser commented 1 month ago

This config now works fine for me without warning:

[Nginx HTTP]
title=Web Server (Nginx, HTTP)
description=Small, but very powerful and efficient web server
ports=80/tcp

[Nginx HTTPS]
title=Web Server (Nginx, HTTPS)
description=Small, but very powerful and efficient web server
ports=443/tcp

[Nginx Full]
title=Web Server (Nginx, HTTP + HTTPS)
description=Small, but very powerful and efficient web server
ports=80,443/tcp|443/udp

Or is it much better to introduce a new one for UDP?

[Nginx HTTP]
title=Web Server (Nginx, HTTP)
description=Small, but very powerful and efficient web server
ports=80/tcp

[Nginx HTTPS]
title=Web Server (Nginx, HTTPS)
description=Small, but very powerful and efficient web server
ports=443/tcp

[Nginx Full]
title=Web Server (Nginx, HTTP + HTTPS)
description=Small, but very powerful and efficient web server
ports=80,443/tcp

[Nginx HTTP3]
title=Web Server (Nginx, HTTP + HTTPS)
description=Small, but very powerful and efficient web server
ports=443/udp
droplinxuser commented 1 month ago

From this page: https://manpages.ubuntu.com/manpages/noble/en/man8/ufw.8.html

[Nginx Full]
title=Web Server (Nginx, HTTP + HTTPS)
description=Small, but very powerful and efficient web server
ports=80/tcp|443

I think this is the proper way and should work fine since protocol is optional, so 443 should work with TCP and UDP.

droplinxuser commented 1 month ago

Sorry to bump again. Since Nginx on port 443 with HTTP3 can now talks to TCP and UDP, I think the config can be simplify as:

[Nginx HTTP]
title=Web Server (Nginx, HTTP)
description=Small, but very powerful and efficient web server
ports=80/tcp

[Nginx HTTPS]
title=Web Server (Nginx, HTTPS)
description=Small, but very powerful and efficient web server
ports=443

[Nginx Full]
title=Web Server (Nginx, HTTP + HTTPS)
description=Small, but very powerful and efficient web server
ports=80/tcp|443
eilandert commented 1 month ago

Sorry to bump again. Since Nginx on port 443 with HTTP3 can now talks to TCP and UDP, I think the config can be simplify as:

[Nginx HTTP]
title=Web Server (Nginx, HTTP)
description=Small, but very powerful and efficient web server
ports=80/tcp

[Nginx HTTPS]
title=Web Server (Nginx, HTTPS)
description=Small, but very powerful and efficient web server
ports=443

[Nginx Full]
title=Web Server (Nginx, HTTP + HTTPS)
description=Small, but very powerful and efficient web server
ports=80/tcp|443

Thanks, than this it will be ;-)

droplinxuser commented 1 month ago

It seems this is still not being pushed for Ubuntu 24.04 ppa?

eilandert commented 1 month ago

It seems this is still not being pushed for Ubuntu 24.04 ppa?

It should be. I'll do a rebuild again to make sure.

droplinxuser commented 1 month ago

This is already solved; thank you so much.