0

I have a ruby server running , based on the following repository https://github.com/BuffaloWill/oxml_xxe

I am running Ubuntu without vnc installed. I tried to access the server via my public ip and couldn't proceed with it. I also searched for the code block to edit the localhost ip , which ended up unsuccessful.

So is there any method so that I can forward the 127.0.0.1 to my publicip , such a way I can access it from my local machine

1 Answers1

1
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:80

You can use iptables to forward request to local. But my recommendation is change listen address local to global. Adding layer is not efficient. You can found more details for iptables from there

Open server.rb and add set :bind, 'yourip' confing to after requirements which is line 12 . I hope this will be work.