0

I have the following setup

Web browser (192.168.5.10) ——> Home Ubuntu Server (192.168.5.15) ————->VPN over the internet———>to a public IP——> Work Server (192.168.6.90) ——-> Web interface at 192.168.6.90:8787

On my Windows desktop after establishing the VPN tunnel between ubuntu server and work, I build an SSH Tunnel from the Home desktop to the Home Ubuntu server on port 9090. Then using Firefox and SOCKS5 over 9090 I can connect to the work server and to the web interface at 192.168.6.90:8787

Is it possible somehow to configure the ubuntu server so that every time someone connects from home via browser at 192.168.5.15:9090 this will be forwarded to 192.168.6.90:8787. In other terms to make the ubuntu server do the job of the SSH tunnel and SOCKS5 internally?

I tried port forwarding using

iptables --append FORWARD --protocol tcp --sport 8888 --dst 192.168.28.111 --dport 8787 --jump ACCEPT
iptables --append FORWARD --protocol udp --sport 8888 --dst 192.168.28.111 --dport 8787 --jump ACCEPT

But it didn’t work. Maybe I am doing something maybe this is not possible. I would appreciate any tip. I am not sure this is the right title for this question. I would appreciate any correction.

ECII
  • 205
  • 1
  • 3
  • 7

0 Answers0