Start your rethinkdb instance with this flag:
--bind all
(or bind=all
in the configuration file for your instance)
Block external access to the web UI with these two commands:
sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP
sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT
Install nginx:
sudo apt-get install nginx