alex neu
alex neu

Reputation: 15

Setting up a publicly available Python HTTP server when SSH'd into another server

I am currently experiencing a strange issue when attempting to set up a publicly available internet server. I am seeking some insight into where I may be going wrong. I am pretty new to this sort of thing.

For context, I am trying to set up a publicly available Python HTTP Server on another server which I SSH into (I will refer to this server I SSH into as “SR” for convenience). My Python HTTP Server script is written and good to go (its IP address corresponds to SR's “em1” and is on port 80). If I run my Python script to set up the server on SR, I have no problems sending it a request/accessing it when I am SSH’d into SR. My problem is that I need to be able to reach my server when I am not SSH’d into SR, which I currently cannot do (e.g., using a curl request, attempting to access it by putting the IP address and port number into my browser, etc.).

That I cannot reach my server from “outside” SR makes me suspect that SR is not publicly available. However, when I run an ip addr command when I am SSH’d into SR, I get …inet xxx.xx.xxx.xx/24 brd xxx.xx.xxx.255 scope global em1…. The fact that it says scope global makes me think that SR is publicly available. At the same time, though, any attempt to ping SR’s em1 when not SSH’d into SR fails.

I am thinking that SR must not be publicly accessible to requests, but I don’t know how to “prove” that is the case, nor how to resolve it if SR is the issue here.

Upvotes: 0

Views: 551

Answers (0)

Related Questions