I have an ubuntu server that is currently connected to my iMac via Ethernet bridge with ip address 192.168.2.2
. iMac is sharing the internet with ubuntu server with this.
The iMac's IP address is 192.168.0.105
in the LAN network to the main router/modem. And 192.168.2.1
on the Ethernet bridge with ubuntu server.
The ubuntu server is allowing apache to be accessed to all via port :80
.
So in iMac, I ran sudo ssh -L 80:0.0.0.0:80 ubuntu@192.168.2.2
and I can access the apache server directly in my iMac browser using localhost
.
Question is, if I have another computer in the LAN that I would like it to access the apache ubuntu server via iMac ip address 192.168.1.105
. How would that work?
I have tried accessing it with 192.168.0.105
in the computer browser, but doesn't seem to work.
And it's not possible to access it directly with 192.168.2.2
since that's the ip address over the Ethernet bridge connection to iMac.