I've come here as a last resort, I have a Windows machine installed on it is Oracle VB with Debian 12 VM on it that I use to run an API on.

When I try to access the API on the Linux server using it works fine and the API responds as expected.

So I made a port forwarding on Oracle (I am using a NAT adapter) to forward from the Windows host to the API on the Linux server.

Then I tried to connect to the API from my Windows machine using but it didn't work it kept on loading but nothing appears.


  • I use the same concept (port forwarding) to connect from my Windows machine to the Linux server using SSH and it works perfectly so idk why this is happening
  • I start the API using uvicorn --host app.main:app so it should listen to any IP
  • I've set the CORS origins to origins = ["*"] so it should allow any origin

Port Forwarding window


1 Answer 1


Ok... I've been trying to solve this problem for the past 4 days and it turned out that the problem was with the firewall on Linux.

If anyone faces the same problem, run these commands.

iptables -I INPUT -p tcp -m tcp --dport {port_number} -j ACCEPT

sudo ufw allow {port_number}

sudo firewall-cmd --add-port={port_number}/tcp --permanent

Replace {port_number} with the port you wanna use. Also remove the curly brackets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.