Ports for gitea and gitlfs?

I’m working on my ufw firewall rules and I want to be sure that ufw permits the traffic I want and denies the rest. Please advise me.

My gitea instance runs on a server in my DMZ. It listens on port 3000. Is that enough? I have an old firewall rule that forwards traffic on ports in the range 3000-5997 to the gitea server. Is that necessary?

That is most unusual. Normally that port stays closed to the internet and you allow proxied access using HTTPS on TCP port 443.

Thanks. I’ll look into the reverse proxy. I set up gitea on port 3000 because I didn’t know about reverse proxying for gitea.

I still don’t know why my firewall has that range of ports open for gitea.

Gitea listens on port 3000, but you normally don’t want to expose that port to the internet, hence the standard practice of proxying HTTPS to it.

Wouldn’t you have had to open those ports?

Yes, certainly port 3000. I’m not sure why I opened ports 3001 through 5997. I can’t find any documentation on that.