I need to get Gitea to use standard ports (22/443) while also allowing TrueNAS to operate on these ports.
TrueNAS is at 172.23.7.13. I was able to tell the web server to bind to this address instead of 0.0.0.0:443, but can’t figure out how to pass ListenAddress to sshd, so I simply changed it to port 2222 (less than ideal).
Then, in the Gitea app settings, I set the WUI and SSH ports to 443 and 22, respectively, then set the Host IP on both to 172.23.7.16, which has been added as a secondary IP on TrueNAS.
This worked until I started configuring Gitea. Upon trying to add an LDAP authentication source, I lost access to TrueNAS. Navigating to 172.23.7.13 brought me to Gitea. Somehow, Gitea, in it’s container, was able to hijack traffic to 172.23.7.13:443.
After logging into TrueNAS via ssh (2222), i was able to stop the gitea container and restore TrueNAS WUI access, but now I’m stuck.
Docker inspect shows that he PortBindings are correct, does it not?
"NetworkMode": "ix-internal-gitea-gitea-net",
"PortBindings": {
"22/tcp": [
{
"HostIp": "172.23.7.16",
"HostPort": "22"
}
],
"443/tcp": [
{
"HostIp": "172.23.7.16",
"HostPort": "443"
}
]
},
I’m not quite sure what else I can do. I’m not sure if this is a TrueNAS problem or a Docker problem, but I can set up Gitea on Podman with zero issues. Using Podman is possible, but less than ideal. I’d much rather have my git repositories in TrueNAS where they are immediately available from backups rather than being buried in a backup image of a virtual disk.