Can I acess a web server located in another subnet?

in flag

I have a Laptop and a PC. My first laptop shares the same LAN as the PC, let's say they have and so I can SSH into it, ping it, etc… and vice-versa.

Now, I have an app on the PC that creates a web server on a different interface and I access that web server, ONLY from my PC( with the IP

So my question is… Is there any way I can access this web server ( with my Laptop( ? Maybe some kind of SSH Tunnel… or a Proxy… IDK?

Thanks in advance.

us flag

Yes, you just need a router. Routing traffic between subnets is literally what routers are for.

br flag

There are several approaches to solving your question. The easiest would be to tweak the app to bind its port not just to the second interface but also to your primary interface (which has a connection to your laptop). Depending on what app it is, you may be able to do this by checking it's configuratoin options.

If that is not an option you could setup routing on your Desktop machine, that bridges the two interfaces together. Depending on your OS the approaches to this will vary.

Lastly, since you explicitly asked for it: You can also setup an SSH server on your Desktop system (that will listen on the interface the Laptop is attached to) and dial in to it from your laptop, using remote porrt forwarding to build an SSH tunnel with the specific ports the app uses for network communication. The laptop can then connect to the app using localhost as an address, as traffic will be forwarded to the Desktop system which can in turn access the app on the secondary network interface.

GBT55 avatar
in flag
I'm currently using CentOS 8, do you know how to bridge two interfaces here?
br flag
Check out the following resource:
in flag
CentOS 8 has already reached it's end of life and should not be used anymore.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.