Sorry to get back to this so late but I was away from work for a bit.
I did edit the uhttpd file and tried to change the http and https ports but that didn't work. It was set to 0.0.0.0:80 and 0.0.0.0:443 and I tried changing it to port 83 and 84 (which should be unused) but that didn't work either. I could see, that the ports were open but I couldn't use them to open the webui via the vpn. It did work with the wired connection directly to my computer. I also tried changing it to port 22 because I know the port works because ssh is working but when I tried to reach the webui with a browser and "ip":22 I got an error even when trying my wired ip.
Below is the content of my uhttpd file so if you can see some errors there please let me know:
config uhttpd 'main'
option enablehttp '1'
option home '/www'
option max_requests '3'
option max_connections '100'
option cert '/etc/uhttpd.crt'
option key '/etc/uhttpd.key'
option cgi_prefix '/cgi-bin'
option script_timeout '600'
option network_timeout '30'
option http_keepalive '20'
option tcp_keepalive '1'
option ubus_prefix '/ubus'
option redirect_https '0'
option rfc1918_filter '0'
option _httpWanAccess '1'
option _httpsWanAccess '1'
option _sshWanAccess '1'
option listen_http '0.0.0.0:80'
option listen_https '0.0.0.0:443'
option listen_ssh '0.0.0.0:22'
config uhttpd 'hotspot'
list listen_http '0.0.0.0:81'
list listen_https '0.0.0.0:444'
option enablehttp '1'
option home '/www/hotspot'
option rfc1918_filter '0'
option max_requests '3'
option max_connections '100'
option cert '/etc/uhttpd.crt'
option key '/etc/uhttpd.key'
option cgi_prefix '/cgi'
option script_timeout '600'
option network_timeout '30'
option http_keepalive '20'
option tcp_keepalive '1'
option no_dirlists '1'
option ubus_prefix '/ubus'
option disabled '1'
config rms_uhttpd 'rms'
option port '9000'
option enablehttp '1'
option home '/www'
option rfc1918_filter '0'
option max_requests '3'
option max_connections '100'
option cgi_prefix '/cgi-bin'
option script_timeout '60'
option network_timeout '30'
option http_keepalive '20'
option tcp_keepalive '1'
option ubus_prefix '/ubus'
config cert 'openssl'
option days '730'
option bits '2048'
option country 'LT'
option state 'Vilnius'
option location 'Vilnius'
option commonname 'Teltonika'