Port issues while deploying Dgraph on Ubuntu Cloud instance

Hello everyone :raised_hand: , i’m currently trying to deploy Dgraph on my Ubuntu instance, i’m having trouble setting up the security rules.
What i’m currently trying to acheive is :

-I want to block public access to port 8080 so http requests can only be sent from inside the server.
-I want to block public access to port 8000 and only allow my Workspace I.P adress to acces the U.I

Here is my IPTables rule-set :

-A INPUT -s 127.0.0.1/32 -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -s 127.0.0.1/32 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -s 127.0.0.1/32 -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -s “my ip”/32 -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -s “my ip”/32 -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8000 -j DROP
-A INPUT -p tcp -m tcp --dport 8080 -j DROP

I can only access Ratel-Ui if i let port 8000 open , is there a way to keep it closed to the public and still access ratel from my personnal ip ?

Thank You.

Try to use some kind of proxy. This ability is outside Dgraph’s scope. If you block access via Firewall. We can not do anything with it. In that case, I recommend that you use the various popular proxy and tunnel services.

There is a famous one among the devs that creates tunnels easily. That approach should fit your needs.

Thank you for your response , i’m going to try and achieve that with NGINX, bye !